pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #16783: pg_rewind: option -c does not work when configuration files are outside data directory
2+ messages / 2 participants
[nested] [flat]
* BUG #16783: pg_rewind: option -c does not work when configuration files are outside data directory
@ 2020-12-21 15:14 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2020-12-21 15:14 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: edwin.polkerman@splendiddata.com
The following bug has been logged on the website:
Bug reference: 16783
Logged by: Edwin Polkerman
Email address: edwin.polkerman@splendiddata.com
PostgreSQL version: 13.1
Operating system: Centos7/8, RHEL7/8, SUSE12/15
Description:
To my opinion this report is more an improvement then a real bug.
We use PostgreSQL in such way that the configuration files are outside the
data directory. So for target location following applies:
- data location : /var/postgres/13/data
- config files location: /etc/postgres/13/data
On the target location 'restore_command' is filled in postgresql.conf.
Trying pg_rewind with following command:
pg_rewind --target-pgdata=/var/postgres/13/data -P -R -c
--source-server='host=<ip-address> port=5432 user=<user> password=<passwd>
dbname=postgres'
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.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #16783: pg_rewind: option -c does not work when configuration files are outside data directory
@ 2020-12-22 04:33 Michael Paquier <michael@paquier.xyz>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Michael Paquier @ 2020-12-22 04:33 UTC (permalink / raw)
To: edwin.polkerman@splendiddata.com; pgsql-bugs@lists.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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-12-22 04:33 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21 15:14 BUG #16783: pg_rewind: option -c does not work when configuration files are outside data directory PG Bug reporting form <noreply@postgresql.org>
2020-12-22 04:33 ` Michael Paquier <michael@paquier.xyz>
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