Re: Long running query causing XID limit breach

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: sud <suds1434(at)gmail(dot)com>, Simon Elbaz <elbazsimon9(at)gmail(dot)com>
Cc: yudhi s <learnerdatabase99(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Long running query causing XID limit breach
Date: 2024-06-05 10:22:57
Message-ID: c1d238173bf8ba94018b65beb4e1670f0d37f766.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2024-06-05 at 13:09 +0530, sud wrote:
> > > One follow up question i have , as we are setting one of the standby/replica
> > > with value idle_in_transaction_session_timeout=-1 which can cause the WAL's
> > > to be heavily backlogged in a scenario where we have a query running for very
> > > long time on that instance. So in that case will there be chances of instance
> > > restart and if that can be avoided anyway?
>
> My apologies. I was meant to say setting up "max_standby_streaming_delay" To -1.
> Which means unlimited lag. 

There should never be a restart unless you perform one or the standby crashes.
If you mean that you want to avoid a crash caused by a full disk on the standby,
the answer is probably "no". Make sure that you have enough disk space and
use monitoring.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2024-06-05 10:26:03 Re: Logical replication type- WAL recovery fails and changes the size of wal segment in archivedir
Previous Message Russell Mercer 2024-06-05 08:55:29 Re: Unable to connect to any data source for foreign server