pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Abhishek Prakash <abhishek.prakash08@infosys.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
To: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
To: usergroups@postgresql.org <usergroups@postgresql.org>
Subject: Re: ***Conflict with recovery error***
Date: Fri, 20 Jan 2023 10:55:48 +0100
Message-ID: <93e483c3c8688029295a972bb701f41af9fac877.camel@cybertec.at> (raw)
In-Reply-To: <SI2PR02MB5490F6959EF4B92A9CC41C2681C59@SI2PR02MB5490.apcprd02.prod.outlook.com>
References: <SI2PR02MB5490F6959EF4B92A9CC41C2681C59@SI2PR02MB5490.apcprd02.prod.outlook.com>

On Fri, 2023-01-20 at 08:56 +0000, Abhishek Prakash wrote:
> We are facing below issue with read replica we did work arounds by setting
> hot_standby_feedback, max_standby_streaming_delay and max_standby_archive_delay,
> which indeed caused adverse effects on primary DB and storage. As our DB is
> nearly 6 TB which runs as AWS Postgres RDS. 
>  
> Even the below error occurs on tables where vacuum is disabled and no DML
> operations are permitted. Will there be any chances to see row versions
> being changed even if vacuum is disabled.
> Please advise.
>  
> 2023-01-13 07:20:12 UTC:10.64.103.75(61096):ubpreplica@ubprdb01:[17707]:ERROR:  canceling statement due to conflict with recovery
> 2023-01-13 07:20:12 UTC:10.64.103.75(61096):ubpreplica@ubprdb01:[17707]:DETAIL:  User query might have needed to see row versions that must be removed.

It could be HOT chain pruning or an anti-wraparound autovacuum (which runs
even if autovacuum is disabled).
Disabling autovacuum is not a smart idea to begin with.

Your best bet is to set "max_standby_streaming_delay = -1".

More reading:
https://www.cybertec-postgresql.com/en/streaming-replication-conflicts-in-postgresql/

Yours,
Laurenz Albe





view thread (4+ messages)  latest in thread

Message-ID: <93e483c3c8688029295a972bb701f41af9fac877.camel@cybertec.at>
Permalink:  ../93e483c3c8688029295a972bb701f41af9fac877.camel@cybertec.at/
Also on:    postgresql.org/message-id/93e483c3c8688029295a972bb701f41af9fac877.camel@cybertec.at

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, abhishek.prakash08@infosys.com, pgsql-hackers@lists.postgresql.org, usergroups@postgresql.org
  Subject: Re: ***Conflict with recovery error***
  In-Reply-To: <93e483c3c8688029295a972bb701f41af9fac877.camel@cybertec.at>
  References: <SI2PR02MB5490F6959EF4B92A9CC41C2681C59@SI2PR02MB5490.apcprd02.prod.outlook.com> <93e483c3c8688029295a972bb701f41af9fac877.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