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

From Ajin Cherian
Subject Re: Improve pg_sync_replication_slots() to wait for primary to advance
Date
Msg-id CAFPTHDawFyqWuBM2r5imMsodzzZT+KdrFicesu7NksnE7PCfpg@mail.gmail.com
Whole thread Raw
In response to Re: Improve pg_sync_replication_slots() to wait for primary to advance  (shveta malik <shveta.malik@gmail.com>)
List pgsql-hackers
On Tue, Oct 7, 2025 at 10:43 PM shveta malik <shveta.malik@gmail.com> wrote:
>
>
> Yes, we can control naptime based on the fact whether any slots are
> being advanced on primary. This is how a slotsync worker does. It
> keeps on doubling the naptime if there is no activity on primary
> starting from 200ms till max of 30 sec. As soon as activity happens,
> naptime is reduced to 200ms again.
>

I have modified the patch to use the same wait logic as the slotsync
worker. I have also incorporated the document changes that you shared.
Attaching v16 with the  above changes.


regards,
Ajin Cherian
Fujitsu Australia

Attachment

pgsql-hackers by date:

Previous
From: Jasper Smit
Date:
Subject: Visibility bug in tuple lock
Next
From: jian he
Date:
Subject: Re: bug, ALTER TABLE call ATPostAlterTypeCleanup twice for the same relation