Re: [PATCH] Allow to specify restart_lsn inpg_create_physical_replication_slot()

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [PATCH] Allow to specify restart_lsn inpg_create_physical_replication_slot()
Дата
Msg-id 20200623011843.GE50978@paquier.xyz
обсуждение исходный текст
Ответ на Re: [PATCH] Allow to specify restart_lsn inpg_create_physical_replication_slot()  (Alexey Kondratov <a.kondratov@postgrespro.ru>)
Ответы Re: [PATCH] Allow to specify restart_lsn inpg_create_physical_replication_slot()  (Alexey Kondratov <a.kondratov@postgrespro.ru>)
Список pgsql-hackers
On Mon, Jun 22, 2020 at 08:18:58PM +0300, Alexey Kondratov wrote:
> I wonder how it could be used via the replication protocol, but probably
> this option should be added there as well for consistency.

Mostly the same code path is taken by the SQL function and the
replication command, so adding a new option to both when adding a new
option makes sense to me for consistency.  The SQL functions are
actually easier to use when it comes to tests, as there is no need to
worry about COPY_BOTH not supported in psql.

> Things get worse when we allow specifying an older LSN, since it has a
> higher chances to be at the horizon of deletion by checkpointer. Anyway, if
> I get it correctly, with a current patch slot will be created successfully,
> but will be obsolete and should be invalidated by the next checkpoint.

Is that a behavior acceptable for the end user?  For example, a
physical slot that is created to immediately reserve WAL may get
invalidated, causing it to actually not keep WAL around contrary to
what the user has wanted the command to do.
--
Michael

Вложения

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

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: min_safe_lsn column in pg_replication_slots view
Следующее
От: Thomas Munro
Дата:
Сообщение: Move syncscan.c?