[PATCH] Allow to specify restart_lsn inpg_create_physical_replication_slot()

Поиск
Список
Период
Сортировка
От Vyacheslav Makarov
Тема [PATCH] Allow to specify restart_lsn inpg_create_physical_replication_slot()
Дата
Msg-id a7388f45d8744b17ec8b05beb20d84ea@postgrespro.ru
обсуждение исходный текст
Ответы Re: [PATCH] Allow to specify restart_lsn inpg_create_physical_replication_slot()  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hello, hackers.

I would like to propose a patch, which allows passing one extra 
parameter to pg_create_physical_replication_slot() — restart_lsn. It 
could be very helpful if we already have some backup with STOP_LSN from 
a couple of hours in the past and we want to quickly verify wether it is 
possible to create a replica from this backup or not.

If the WAL segment for the specified restart_lsn (STOP_LSN of the 
backup) exists, then the function will create a physical replication 
slot and will keep all the WAL segments required by the replica to catch 
up with the primary. Otherwise, it returns error, which means that the 
required WAL segments have been already utilised, so we do need to take 
a new backup. Without passing this newly added parameter 
pg_create_physical_replication_slot() works as before.

What do you think about this?

-- 
Vyacheslav Makarov

Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Вложения

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

Предыдущее
От: Juan José Santamaría Flecha
Дата:
Сообщение: Re: factorial of negative numbers
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: [patch] demote