From: | Matt Pearson <mpearson2(at)pythian(dot)com> |
---|---|
To: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: Queries in replica are failing |
Date: | 2024-05-16 12:13:18 |
Message-ID: | 3fe3d1ea-6bba-44bd-ac66-d8730d643fbe@pythian.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi,
I would probably use "/hot_standby_feedback/" rather than change the
delay parameters, unless you want to have the read replica (Standby)
actually to operate some time behind the primary, for some reason (like
having a copy of the data an hour old to fix mistakes on the primary).
https://postgresqlco.nf/doc/en/param/hot_standby_feedback/
The /hot_standby_feedback /parameter sends feedback to the primary, so
the transaction is less likely to be cancelled. The only draw back is
that is can cause some bloat on the primary database.
Regards,
Matt
On 16/05/2024 13:01, Siraj G wrote:
> Hello -
>
> 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?
>
> Regards
> Siraj
--
--
From | Date | Subject | |
---|---|---|---|
Next Message | ravi k | 2024-05-16 13:29:59 | Replication slot dropped in Bidirection rep: column addition |
Previous Message | Siraj G | 2024-05-16 12:01:23 | Queries in replica are failing |