On Mon, Aug 25, 2025 at 6:02 AM Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
>
>
> Hi Sawada-san,
>
> I reviewed the latest patch and have following comments:
>
> 1. In commit message, word 'slot' is missing:
> When the first logical replication is created, the system
> automatically increases the effective WAL level to maintain
>
> Instead it should be:
> When the first logical replication slot is created, ...
Fixed.
>
> 2. In slot.c:
> +/*
> + * Returns if there is at least in-use logical replication slot.
> + */
>
> Should we update it to:
> Returns true if there is at least one in-use logical replication slot.
Fixed.
>
> 3. Due to recent commit [1], we cannot use "sync_replication_slots" =
> on when wal_level < logical.
> We get following error on standby:
> 2025-08-25 16:37:04.757 IST [2901542] FATAL: replication slot
> synchronization ("sync_replication_slots" = on) requires "wal_level"
> >= "logical"
> If we set the wal_level = logical on standby, then this error does not
> appear and a slot sync worker is spawned.
>
> With this patch, I think we can allow use of "sync_replication_slots"
> = on when wal_level >= replica as standby will be dependent on
> effective_wal_level on primary. Thoughts?
> I also see that with patch, the use of pg_sync_replication_slots()
> works with wal_level = replica.
Good point. I agree with you, so fixed.
I've attached the updated patch that incorporated the comments and is
rebased to the current HEAD.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com