From: | Will Storey <will(at)summercat(dot)com> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Cancelled query due to buffer deadlock with recovery |
Date: | 2024-12-09 00:42:38 |
Message-ID: | Z1Y8_q_q41S8AKIF@dev.null |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello!
I am running Postgres 16.6 on a primary and several standby servers. I
recently observed 3 queries being cancelled with this error:
ERROR: canceling statement due to conflict with recovery (SQLSTATE 40P01)
There was this detail with the error:
User transaction caused buffer deadlock with recovery
The standbys have hot_standby_feedback=on and
max_standby_streaming_delay=1min.
As far as I can tell, there were no long running transactions at the time
on either the primary or the standby in question. I did not see any
replication delay according to monitoring.
The queries that were cancelled were reading catalog tables - pg_inherits
joined with pg_class. I typically expect them to complete quickly (they
have a 100ms statement timeout).
I understand that canceling due to conflicts should be expected when using
hot standbys, but I'm struggling to understand why it happened in this
case.
What do you think?
Thank you!
Will
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2024-12-09 07:48:26 | Re: Empty query_id in pg_stat_activity |
Previous Message | Michel Pelletier | 2024-12-08 07:05:13 | Re: Using Expanded Objects other than Arrays from plpgsql |