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

From: Alexey Kondratov <a(dot)kondratov(at)postgrespro(dot)ru>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, vladimirlesk(at)yandex-team(dot)ru, Dmitriy Sarafannikov <dsarafan(at)yandex-team(dot)ru>
Subject: Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line
Date: 2018-10-29 09:09:21
Message-ID: 527530a0-3460-7c32-d223-3014ddaeee8e@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurenz Albe 2018-10-29 09:09:38 Re: pg_promote not marked as parallel-restricted in pg_proc.dat
Previous Message Michael Paquier 2018-10-29 09:03:49 Re: pg_promote not marked as parallel-restricted in pg_proc.dat