Re: pg_rewind problem: cannot find WAL

2025-05-09 Thread Luca Ferrari
On Thu, May 8, 2025 at 5:11 PM Adrian Klaver wrote: > /usr/lib/postgresql/17/bin/pg_rewind --help > pg_rewind resynchronizes a PostgreSQL cluster with another copy of the > cluster. >--config-file=FILENAME use specified main server configuration shame on me! I was grepping config_fil

Re: pg_rewind problem: cannot find WAL

2025-05-08 Thread Adrian Klaver
On 5/8/25 04:26, Luca Ferrari wrote: On Thu, May 8, 2025 at 8:54 AM Luca Ferrari 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 configu

Re: pg_rewind problem: cannot find WAL

2025-05-08 Thread Rob Sargent
> > 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 > > A symlink

Re: pg_rewind problem: cannot find WAL

2025-05-08 Thread Luca Ferrari
On Thu, May 8, 2025 at 4:04 PM Rob Sargent wrote: > > > A symlink from $PGDATA to where actual file? > Could be, I need to experiment with pg_basebackup to ensure it is not conflicting with the /etc/ configuration file when creating a clone. Luca

Re: pg_rewind problem: cannot find WAL

2025-05-08 Thread Luca Ferrari
On Thu, May 8, 2025 at 8:54 AM Luca Ferrari 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

Re: pg_rewind problem: cannot find WAL

2025-05-07 Thread Luca Ferrari
On Wed, May 7, 2025 at 3:55 PM Laurenz Albe wrote: > > I don't think it is connected to a WAL switch. > Thanks. > I'd say that you should set "wal_keep_size" high enough that all the WAL > needed for pg_rewind is still present. > > If you have a WAL archive, you could define a restore_command on

Re: pg_rewind problem: cannot find WAL

2025-05-07 Thread Laurenz Albe
On Wed, 2025-05-07 at 12:51 +0200, Luca Ferrari wrote: > running 17.4 on ubuntu 24.04 machines. I've three hosts, pg-1 > (primary) and two physical replicas. > I then promote host pg-3 as a master (pg_promote()) and want to rewind > the pg-1 to follow the new master, so: > > ssh pg-3 'sudo -u post