Re: Helper functions for wait_for_catchup() in Cluster.pm

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Helper functions for wait_for_catchup() in Cluster.pm
Дата
Msg-id 20230117112323.qz7fgojcdbwrt74v@alvherre.pgsql
обсуждение исходный текст
Ответ на Helper functions for wait_for_catchup() in Cluster.pm  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
Ответы Re: Helper functions for wait_for_catchup() in Cluster.pm  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
Список pgsql-hackers
On 2023-Jan-17, Drouvot, Bertrand wrote:

> The idea has been raised in [1], where we are adding more calls to
> wait_for_catchup() in 'replay' mode.

This seems mostly useless as presented.  Maybe if you're able to reduce
the noise on the second argument it would be worth something -- namely,
if the wrapper function receives a node instead of an LSN: perhaps
wait_for_replay_catchup() would use the flush LSN from the given node,
wait_for_write_catchup() would use the write LSN, and
wait_for_sent_catchup() would use the insert LSN.  (I didn't check in
your patch if there are callsites that do something else).  This would
in several cases let you also remove the line with the assignment of
appropriate LSN to a separate variable.  If you did it that way, maybe
the code would become a tiny bit smaller overall.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/



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

Предыдущее
От: "wangw.fnst@fujitsu.com"
Дата:
Сообщение: RE: [PATCH] Reuse Workers and Replication Slots during Logical Replication
Следующее
От: Ranier Vilela
Дата:
Сообщение: Re: Small miscellaneus fixes (Part II)