pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: edwin.polkerman@splendiddata.com
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16783: pg_rewind: option -c does not work when configuration files are outside data directory
Date: Tue, 22 Dec 2020 13:33:41 +0900
Message-ID: <X+F3JfiyhXCE0fZf@paquier.xyz> (raw)
In-Reply-To: <16783-6adba0a6c08728e8@postgresql.org>
References: <16783-6adba0a6c08728e8@postgresql.org>

On Mon, Dec 21, 2020 at 03:14:14PM +0000, PG Bug reporting form wrote:
> Following Fatal message is shown:
> pg_rewind: fatal: restore_command is not set in the target cluster
> 
> pg_rewind looks at the postgresql.conf in /var/postgres/13/data in stead of
> the location where the configuration files reside (/etc/postgres/13/data).
> It would be nice to add an option to tell pg_rewind that configuration files
> are on a different location.

pg_rewind uses the command "postgres -C restore_command -D
DATA_FOLDER" to grab the configuration in this case (see
getRestoreCommand() in pg_rewind.c), but here you have a service
startup configuration where the logic makes use of -c
config_file=/etc/postgres/13/data/postgresql.conf, right?  Indeed, we
would need an extra option to be able to support this case and pass
down the configuration file path down to the postgres command used in
pg_rewind.  We could name this option for example --target-conf, that
can only be used when --restore-target-wal is specified.  Would you
like to write a patch?
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (2+ messages)

Message-ID: <X+F3JfiyhXCE0fZf@paquier.xyz>
Permalink:  ../X+F3JfiyhXCE0fZf@paquier.xyz/
Also on:    postgresql.org/message-id/X+F3JfiyhXCE0fZf@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, edwin.polkerman@splendiddata.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16783: pg_rewind: option -c does not work when configuration files are outside data directory
  In-Reply-To: <X+F3JfiyhXCE0fZf@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox