Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line - Mailing list pgsql-hackers

From Alexey Kondratov
Subject Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line
Date
Msg-id 527530a0-3460-7c32-d223-3014ddaeee8e@postgrespro.ru
Whole thread Raw
In response to Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line  (Michael Paquier <michael@paquier.xyz>)
Responses Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
> Something that we could think about is directly to provide a command to
> pg_rewind via command line.

In my patch I added this option too. One can pass restore_command via -R 
option, e.g.:

pg_rewind -P --target-pgdata=/path/to/master/pg_data 
--source-pgdata=/path/to/standby/pg_data -R 'cp /path/to/wals_archive/%f %p'

> Another possibility would be to have a
> separate tool which scans a data folder and fetches by itself a range of
> WAL segments wanted.

Currently in the patch, with dry-run option (-n) pg_rewind only fetches 
missing WALs to be able to build file map, while doesn't touch any data 
files. So I guess it behaves exactly as you described and we do not need 
a separate tool.


-- 
Alexey Kondratov

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



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pg_promote not marked as parallel-restricted in pg_proc.dat
Next
From: Laurenz Albe
Date:
Subject: Re: pg_promote not marked as parallel-restricted in pg_proc.dat