Re: pg_replication_slot_advance to return NULL instead of 0/0 ifslot not advanced

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pg_replication_slot_advance to return NULL instead of 0/0 ifslot not advanced
Дата
Msg-id 20180607004241.GE24853@paquier.xyz
обсуждение исходный текст
Ответ на Re: pg_replication_slot_advance to return NULL instead of 0/0 if slotnot advanced  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Список pgsql-hackers
On Wed, Jun 06, 2018 at 04:57:22PM +0200, Petr Jelinek wrote:
> I think the only thing to note about the patches from my side is that we
> probably don't want to default to restart_lsn for the
> pg_logical_replication_slot_advance() return value (when nothing was
> done) but rather the confirmed_lsn. As it is in current patch if we call
> the function repeatedly and one call moved slot forward but the next one
> didn't the return value will go backwards as restart_lsn tends to be
> behind the confirmed one.

It does not matter much as the PG_TRY loop would still enforce the
result to confirmed_lsn anyway if nothing happens, still let's do as you
suggest as that's more consistent.
--
Michael

Вложения

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Spilling hashed SetOps and aggregates to disk
Следующее
От: Amit Langote
Дата:
Сообщение: Re: Remove mention in docs that foreign keys on partitioned tablesare not supported