Re: Queries in replica are failing

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Siraj G <tosiraj(dot)g(at)gmail(dot)com>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Queries in replica are failing
Date: 2024-05-16 14:33:56
Message-ID: 54f2b8280802608c687e21dfe05954d34a26346f.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Prasanth 2024-05-16 21:27:31 Streaming Replication Postgresql 16
Previous Message S Hoffman 2024-05-16 14:17:04 Re: Where to learn PostgreSQL for free?