Re: Synchronizing slots from primary to standby

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Synchronizing slots from primary to standby
Дата
Msg-id CAA4eK1+ovDb0b0dzcuahbL6dvdn874snUp6VWA0=G9CCFYxHAw@mail.gmail.com
обсуждение исходный текст
Ответ на RE: Synchronizing slots from primary to standby  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Список pgsql-hackers
On Fri, Mar 29, 2024 at 9:34 AM Hayato Kuroda (Fujitsu)
<kuroda.hayato@fujitsu.com> wrote:
>
> Thanks for updating the patch! Here is a comment for it.
>
> ```
> +        /*
> +         * By advancing the restart_lsn, confirmed_lsn, and xmin using
> +         * fast-forward logical decoding, we can verify whether a consistent
> +         * snapshot can be built. This process also involves saving necessary
> +         * snapshots to disk during decoding, ensuring that logical decoding
> +         * efficiently reaches a consistent point at the restart_lsn without
> +         * the potential loss of data during snapshot creation.
> +         */
> +        pg_logical_replication_slot_advance(remote_slot->confirmed_lsn,
> +                                            found_consistent_point);
> +        ReplicationSlotsComputeRequiredLSN();
> +        updated_lsn = true;
> ```
>
> You added them like pg_replication_slot_advance(), but the function also calls
> ReplicationSlotsComputeRequiredXmin(false) at that time. According to the related
> commit b48df81 and discussions [1], I know it is needed only for physical slots,
> but it makes more consistent to call requiredXmin() as well, per [2]:
>

Yeah, I also think it is okay to call for the sake of consistency with
pg_replication_slot_advance().

--
With Regards,
Amit Kapila.



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

Предыдущее
От: Jelte Fennema-Nio
Дата:
Сообщение: Re: [EXTERNAL] Re: Add non-blocking version of PQcancel
Следующее
От: Alexander Lakhin
Дата:
Сообщение: Re: To what extent should tests rely on VACUUM ANALYZE?