Re: Replication slot is not able to sync up - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Replication slot is not able to sync up
Date
Msg-id CA+Tgmoau5SdVcL8isR7P1soT=vcC8rMf5Sipcb-82uRW7+X+xw@mail.gmail.com
Whole thread Raw
In response to RE: Replication slot is not able to sync up  ("Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>)
List pgsql-hackers
On Fri, May 30, 2025 at 6:08 AM Zhijie Hou (Fujitsu)
<houzj.fnst@fujitsu.com> wrote:
> To improve this workload scenario, we can modify pg_sync_replication_slots() to
> wait for the primary slot to advance to a suitable position before completing
> synchronization and removing the temporary slot. This would allow the sync to
> complete as soon as the primary slot advances, whether through
> pg_logical_xx_get_changes() or other ways.

My understanding of this area is limited, but this sounds potentially
promising to me. The current approach seems very timing-dependent.
Depending on the state of the primary vs. the state of the standby, a
call to pg_sync_replication_slots() may either create a slot or fail
to do so. A call at a slightly earlier or later time might have had a
different result. IIUC, this proposal would make different results due
to minor timing variations less probable.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: pg_upgrade: warn about roles with md5 passwords
Next
From: Nathan Bossart
Date:
Subject: Re: pg_upgrade: warn about roles with md5 passwords