Re: Queries in replica are failing - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: Queries in replica are failing
Date
Msg-id 54f2b8280802608c687e21dfe05954d34a26346f.camel@cybertec.at
Whole thread Raw
In response to Queries in replica are failing  (Siraj G <tosiraj.g@gmail.com>)
Responses Re: Queries in replica are failing
List pgsql-admin
On Thu, 2024-05-16 at 17:31 +0530, Siraj G wrote:
> Queries in replica instance are failing with the error "cancelling statement due
> to conflict with recovery". I was checking two parameters (max_standby_archive_delay
> and max_standby_streaming_delay)  which may allow the queries to run within the
> time defined in those.
>
> Is it recommended to set those? Is there any other suggestion to tackle this?

The only safe way to avoid this error is to set "max_standby_streaming_delay" to -1.

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

Yours,
Laurenz Albe



pgsql-admin by date:

Previous
From: S Hoffman
Date:
Subject: Re: Where to learn PostgreSQL for free?
Next
From: Prasanth
Date:
Subject: Streaming Replication Postgresql 16