Re: pg_basebackup and pg_switch_wal()

2025-07-30 Thread Fabrice Chapuis
To note effectively that the problem comes from a fix in version 17 PostgreSQL: Release Notes Change file boundary handling of two WAL file name functions (Kyotaro Horiguchi, Andres Freund, Bruce Momjian) Regards, Fabrice On Wed, Jul 30, 2025 at

Re: pg_basebackup and pg_switch_wal()

2025-07-30 Thread Fabrice Chapuis
Thanks Israel for these informations. In fact, I thought at first of a problem related to the version of pg_basebackup in version 17. I should have posted first on the barman github. Best regards, Fabrice On Wed, Jul 30, 2025 at 12:47 AM Israel Barth Rubio wrote: > Hello Fabrice, > > > But I d

Re: pg_basebackup and pg_switch_wal()

2025-07-29 Thread Israel Barth Rubio
Hello Fabrice, > But I do not understand this error with the barman wrapper: > > Backup completed (start time: 2025-07-26 21:45:07.238223, elapsed time: 19 seconds) > Waiting for the WAL file 00030B3F000C from server 'x_service' (max: 600 seconds) > Processing xlog segments from stream

Re: pg_basebackup and pg_switch_wal()

2025-07-29 Thread Fabrice Chapuis
Thanks for answering Sergei. ok in file postgres/src/backend/access/transam/xlog.c function void do_pg_backup_stop(BackupState *state, bool waitforarchive) there is /* * Force a switch to a new xlog segment file, so that the backup is * valid as soon as archiver moves out the current segment fil

Re: pg_basebackup and pg_switch_wal()

2025-07-29 Thread Sergei Kornilov
Hello > This is not the case also when the backup is made from the primary? On primary it is handled in do_pg_backup_stop function (called from perform_base_backup after basebackup was transferred), without explicitly called pg_switch_wal from pg_basebackup. pg_basebackup can change this behavi

pg_basebackup and pg_switch_wal()

2025-07-29 Thread Fabrice Chapuis
Hi, I read the doc concerning pg_basebackup pg_basebackup cannot force the standby to switch to a new WAL file at the end of backup. When you are using -X none, if write activity on the primary is low, pg_basebackup may need to wait a long time for the last WAL file required for the backup to be