| From: | Alexey Kondratov <a(dot)kondratov(at)postgrespro(dot)ru> | 
|---|---|
| To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> | 
| Cc: | Liudmila Mantrova <l(dot)mantrova(at)postgrespro(dot)ru>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, David Steele <david(at)pgmasters(dot)net>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, vladimirlesk(at)yandex-team(dot)ru, dsarafan(at)yandex-team(dot)ru | 
| Subject: | Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line | 
| Date: | 2019-09-26 12:08:22 | 
| Message-ID: | [email protected] | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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
| Attachment | Content-Type | Size | 
|---|---|---|
| v10-0001-pg_rewind-options-to-use-restore_command-from-co.patch | text/x-patch | 22.9 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Antonin Houska | 2019-09-26 12:08:33 | Re: Attempt to consolidate reading of XLOG page | 
| Previous Message | Christoph Berg | 2019-09-26 11:04:26 | Unstable select_parallel regression output in 12rc1 |