Re: is pg_log_standby_snapshot() really needed?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: is pg_log_standby_snapshot() really needed?
Дата
Msg-id 20230607230249.kgzd2mucs4iuxnl3@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: is pg_log_standby_snapshot() really needed?  (Jaime Casanova <jcasanov@systemguards.com.ec>)
Список pgsql-hackers
Hi,

On 2023-06-07 13:50:30 -0500, Jaime Casanova wrote:
> CHECKPOINT could be expensive in a busy system, but the problem
> pg_log_standby_snapshot() is solving is about a no-activity system,
> and in a no-activity system CHECKPOINT is very fast.

There's no easy way for the subscriber to know if the system is active or
not. The only realistic way is to unconditionally issue the relevant
command. And that's not at all ok for CHECKPOINT.


> Even with very low activity SUBSCRIPTION flows fine. As an example I
> put an INSERT happening every 10s and SUBSCRIPTION never stuck no
> CHECKPOINT nor pg_log_standby_snapshot() needed.

Nobody forces you to issue pg_log_standby_snapshot(). If things work fine
without it for you, cool. But it's pretty trivial to see that it doesn't
always:

With pg_log_standby_snapshot() as normal,
recovery/035_standby_logical_decoding takes 15.63s on my machine. Without it I
lost patience after 2 minutes. And the test was only at the start (8 out of 78
subtests).

Greetings,

Andres Freund



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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: pg_collation.collversion for C.UTF-8
Следующее
От: "Fujii.Yuki@df.MitsubishiElectric.co.jp"
Дата:
Сообщение: RE: Partial aggregates pushdown