pgsql: Add option --config-file to pg_rewind

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add option --config-file to pg_rewind
Date: 2022-04-06 23:52:51
Message-ID: E1ncFSE-000eOi-Ss@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add option --config-file to pg_rewind

This option is useful to do a rewind with the server configuration file
(aka postgresql.conf) located outside the data directory, which is
something that some Linux distributions and some HA tools like to rely
on. As a result, this can simplify the logic around a rewind by
avoiding the copy of such files before running pg_rewind.

This option affects pg_rewind when it internally starts the target
cluster with some "postgres" commands, adding -c config_file=FILE to the
command strings generated, when:
- retrieving a restore_command using a "postgres -C" command for
-c/--restore-target-wal.
- forcing crash recovery once to get the cluster into a clean shutdown
state.

Author: Gunnar "Nick" Bluth
Reviewed-by: Michael Banck, Alexander Kukushkin, Michael Paquier,
Alexander Alekseev
Discussion: https://postgr.es/m/7c59265d-ac50-b0aa-ca1e-65e8bd27642a@pro-open.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0d5c387573be5c40bf18b7b8983f406637dff42f

Modified Files
--------------
doc/src/sgml/ref/pg_rewind.sgml | 15 +++++++++++++++
src/bin/pg_rewind/pg_rewind.c | 22 ++++++++++++++++++++++
src/bin/pg_rewind/t/RewindTest.pm | 14 ++++++++++----
3 files changed, 47 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2022-04-06 23:58:08 Re: pgsql: pgstat: add pgstat_copy_relation_stats().
Previous Message Tom Lane 2022-04-06 22:58:32 pgsql: Use ISB as a spin-delay instruction on ARM64.