From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Don Seiler <don@seiler.us>
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: terminating connection due to conflict with recovery
Date: Fri, 09 Oct 2020 17:06:00 +0200
Message-ID: <82d9b8f97e58718be841129026fabfd85ddb7ba2.camel@cybertec.at> (raw)
In-Reply-To: <CAHJZqBBgGZdF2GuE5a6KUW4daxgNgOAwP2N=x+ZYFmzXpAJ3VQ@mail.gmail.com>
References: <CAHJZqBBgGZdF2GuE5a6KUW4daxgNgOAwP2N=x+ZYFmzXpAJ3VQ@mail.gmail.com>
On Thu, 2020-10-08 at 10:17 -0500, Don Seiler wrote:
> I have a PG 12.4 read replica that we're using to offload short read-only queries from the primary. However this morning (and random other days/times, it seems), I see batches of these messages in
> the replica PG log:
>
> FATAL: terminating connection due to conflict with recovery
>
> I have hot_standby_feedback enabled already, but looking further at this message, it isn't cancelling the transaction but rather terminating the connection entirely. This suggests perhaps that a
> session is sitting "idle in transaction" for 30 seconds (our max_standby_streaming_delay is at the default 30s)? Or that a group of sessions are "idle in transaction" and overlapping enough that
> recovery is blocked for 30 seconds?
What do you find in "pg_stat_database_conflicts"?
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, don@seiler.us, pgsql-admin@lists.postgresql.org
Subject: Re: terminating connection due to conflict with recovery
In-Reply-To: <82d9b8f97e58718be841129026fabfd85ddb7ba2.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox