public inbox for [email protected]
help / color / mirror / Atom feedFrom: Luca Ferrari <[email protected]>
To: Laurenz Albe <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: pg_rewind problem: cannot find WAL
Date: Thu, 8 May 2025 13:26:03 +0200
Message-ID: <CAKoxK+6zvRRBcrqUcHOJ+PwBrc7oGD77cKT6Gmwgvh7F9toswg@mail.gmail.com> (raw)
In-Reply-To: <CAKoxK+5XT5bAV+w-4dC=rP+a7t2zkvRf8+-wj087yd1Fd5b2iQ@mail.gmail.com>
References: <CAKoxK+5ypkP1Ts1KNuCgqAxwp=8ejQ-wfiBrpvZ1coZ3dZfOWg@mail.gmail.com>
<[email protected]>
<CAKoxK+5XT5bAV+w-4dC=rP+a7t2zkvRf8+-wj087yd1Fd5b2iQ@mail.gmail.com>
On Thu, May 8, 2025 at 8:54 AM Luca Ferrari <[email protected]> wrote:
>
> I've pgbackrest making backups, so I have an archive_command. I'm
> going to see if putting a restore_command can fix the problem.
>
But I'm facing a quite trivial problem: in ubuntu installation the
configuration files are separated from the PGDATA.
Apparently pg_rewind is trying to read postgresql.conf to get the
restore_command, and I don't know how to specify the different
location of the postgresql.conf (cannot specifcy -c as in postgres):
$ /usr/lib/postgresql/17/bin/pg_rewind -D /var/lib/postgresql/17/main
--source-server="user=replica_fluca host=dev-psqlha3
dbname=replica_fluca" -R -P --debug -c
postgres: could not access the server configuration file
"/var/lib/postgresql/17/main/postgresql.conf": No such file or
directory
no data was returned by command "/usr/lib/postgresql/17/bin/postgres
-D /var/lib/postgresql/17/main -C restore_command"
child process exited with exit code 2
pg_rewind: error: could not read restore_command from target cluster
Any idea?
Clearly, postgresql.auto.conf is within PGDATA, and since my
recovery_command is there, one trick could be to touch and empty
PGDATA/postgresql.conf, pg_rewind, remove the fake configurtion file.
But I'm sure there is a smarter solution.
Thanks,
Luca
view thread (3+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: pg_rewind problem: cannot find WAL
In-Reply-To: <CAKoxK+6zvRRBcrqUcHOJ+PwBrc7oGD77cKT6Gmwgvh7F9toswg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox