pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedFrom: Matt Pearson <mpearson2@pythian.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Queries in replica are failing
Date: Thu, 16 May 2024 13:13:18 +0100
Message-ID: <3fe3d1ea-6bba-44bd-ac66-d8730d643fbe@pythian.com> (raw)
In-Reply-To: <CAC5iy63x1wGXLn8ULtnuPf67o=oCLyFtxvoME4WgezYhKq2YNQ@mail.gmail.com>
References: <CAC5iy63x1wGXLn8ULtnuPf67o=oCLyFtxvoME4WgezYhKq2YNQ@mail.gmail.com>
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
--
--
view thread (11+ messages) latest in thread
Message-ID: <3fe3d1ea-6bba-44bd-ac66-d8730d643fbe@pythian.com>
Permalink: ../3fe3d1ea-6bba-44bd-ac66-d8730d643fbe@pythian.com/
Also on: postgresql.org/message-id/3fe3d1ea-6bba-44bd-ac66-d8730d643fbe@pythian.com
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: mpearson2@pythian.com, pgsql-admin@lists.postgresql.org
Subject: Re: Queries in replica are failing
In-Reply-To: <3fe3d1ea-6bba-44bd-ac66-d8730d643fbe@pythian.com>
* 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