Re: Clear logical slot's 'synced' flag on promotion of standby

Поиск
Список
Период
Сортировка
От Ajin Cherian
Тема Re: Clear logical slot's 'synced' flag on promotion of standby
Дата
Msg-id CAFPTHDbQYVkfwwS_3vuzq0qCfJQ=9kzSdxjMkfqcYSq1TurijA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Clear logical slot's 'synced' flag on promotion of standby  (shveta malik <shveta.malik@gmail.com>)
Список pgsql-hackers
On Mon, Sep 29, 2025 at 4:11 PM shveta malik <shveta.malik@gmail.com> wrote:
>
> On Fri, Sep 26, 2025 at 3:26 PM Ajin Cherian <itsajin@gmail.com> wrote:
> >
> >
> > Attaching v4 which addresses all the above comments.
> >
>
> Few trivial comments:
>
> 1)
>  # Confirm the synced slot 'lsub1_slot' is retained on the new primary
>  is( $standby1->safe_psql(
>   'postgres',
> - q{SELECT count(*) = 2 FROM pg_replication_slots WHERE slot_name IN
> ('lsub1_slot', 'snap_test_slot') AND synced AND NOT temporary;}
> + q{SELECT count(*) = 2 FROM pg_replication_slots WHERE slot_name IN
> ('lsub1_slot', 'snap_test_slot') AND NOT synced AND NOT temporary;}
> +
>   ),
>   't',
>   'synced slot retained on the new primary');
>
> a)
> It is not fault of this patch, but I see comment and query not
> matching. We shall have  both the names 'lsub1_slot', 'snap_test_slot'
> in comment.
>

Fixed.

> b) Also it will be good to mention the expectation from synced flag in
> the comment. How about:
>
> Confirm the synced slots 'lsub1_slot' and 'snap_test_slot' are
> retained on the new primary and 'synced' flag is cleared on promotion.
>

Added.

> 2)
> As Ashutosh suggested, even in RestoreSlotFromDisk(), we can have
> DEBUG1 msg: "synced flag reset for replication slot \"%s\""
>

Added.

Attaching patch v5 addressing the above changes.

regards,
Ajin Cherian
Fujitsu Australia

Вложения

В списке pgsql-hackers по дате отправления: