Re: Improve pg_sync_replication_slots() to wait for primary to advance - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Improve pg_sync_replication_slots() to wait for primary to advance
Date
Msg-id CAExHW5tVvjD8LKoz=evPwgj11pqOYM4xDqnC4UwE-c5f-ZeWAg@mail.gmail.com
Whole thread Raw
In response to Re: Improve pg_sync_replication_slots() to wait for primary to advance  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Improve pg_sync_replication_slots() to wait for primary to advance
List pgsql-hackers
On Sat, Sep 6, 2025 at 9:14 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Fri, Sep 5, 2025 at 11:39 PM Ashutosh Sharma <ashu.coek88@gmail.com> wrote:
> > If the remote slot is inactive since long and lagging behind the
> > standby, this function (pg_sync_replication_slots) could end up
> > waiting indefinitely. While it can certainly be cancelled manually,
> > that behavior might not be ideal for everyone. That’s my
> > understanding; please let me know if you see it differently.
> >
>
> Such a case can be addressed by having additional timeout parameters.
> We can do that as an additional patch if the use case is important
> enough to address.
>

Or we could rely on statement_timeout or the user cancelling the query
explicitly.

--
Best Wishes,
Ashutosh Bapat



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Improve pg_sync_replication_slots() to wait for primary to advance
Next
From: Ashutosh Sharma
Date:
Subject: Re: How can end users know the cause of LR slot sync delays?