Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line

Поиск
Список
Период
Сортировка
От Alexey Kondratov
Тема Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line
Дата
Msg-id 1088452e-19d6-c011-a48c-382e38360c71@postgrespro.ru
обсуждение исходный текст
Ответ на Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line  (Alexey Kondratov <a.kondratov@postgrespro.ru>)
Ответы Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On 01.08.2019 19:53, Alexey Kondratov wrote:
> On 26.07.2019 20:43, Liudmila Mantrova wrote:
>> On a more general note, I wonder if everyone is happy with the 
>> --using-postgresql-conf option name, or we should continue searching 
>> for a narrower term. Unfortunately, I don't have any better 
>> suggestions right now, but I believe it should be clear that its 
>> purpose is to fetch missing WAL files for target. What do you think?
>>
>
> I don't like it either, but this one was my best guess then. Maybe 
> --restore-target-wal instead of --using-postgresql-conf will be 
> better? And --target-restore-command instead of --restore-command if 
> we want to specify that this is restore_command for target server?
>

As Alvaro correctly pointed in the nearby thread [1], we've got an 
interference regarding -R command line argument. I agree that it's a 
good idea to reserve -R for recovery configuration write to be 
consistent with pg_basebackup, so I've updated my patch to use another 
letters:

1. -c/--restore-target-wal --- to use restore_command from postgresql.conf
2. -C/--target-restore-command --- to pass restore_command as a command 
line argument

Updated and rebased patch is attached. However, now I'm wondering, do we 
actually need 1. as a separated option and not being enabled by default? 
I cannot imagine a situation, when restore_command is set in the 
postgresql.conf and someone prefer pg_rewind to fail instead of fetching 
missed WALs automatically, but maybe there are some cases?


[1] 
https://www.postgresql.org/message-id/20190925174812.GA4916%40alvherre.pgsql


-- 
Alexey Kondratov

Postgres Professional https://www.postgrespro.com
Russian Postgres Company


Вложения

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

Предыдущее
От: Christoph Berg
Дата:
Сообщение: Unstable select_parallel regression output in 12rc1
Следующее
От: Antonin Houska
Дата:
Сообщение: Re: Attempt to consolidate reading of XLOG page