public inbox for [email protected]
help / color / mirror / Atom feedFrom: Fujii Masao <[email protected]>
To: Murthy Nunna <[email protected]>
To: Pgsql-admin <[email protected]>
Subject: Re: Running rsync backups in pg15
Date: Sat, 9 Nov 2024 13:54:54 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <DM8PR09MB66779BE5DA062DFB7257BE96B85D2@DM8PR09MB6677.namprd09.prod.outlook.com>
References: <CANzqJaCr-id_4YotukPeH=rHCELS58Z63FoEbkNFBSqzjGMueQ@mail.gmail.com>
<01000193082d1077-34d9461d-49e4-44ef-b83a-0201df4fc0ba-000000@email.amazonses.com>
<DM8PR09MB6677705AE81436745B4487F6B85C2@DM8PR09MB6677.namprd09.prod.outlook.com>
<CANzqJaA02zeZTUB=uFPfxgJ+=NUUy1cQP3E0=3u0ssHdL6qkMA@mail.gmail.com>
<DM8PR09MB6677F19E2DDD6E18A4FDE2D6B85D2@DM8PR09MB6677.namprd09.prod.outlook.com>
<CANzqJaBZ+j2o8jQ8Hs63AQbAZfiFcyApa5d212A1LNkagqyrGQ@mail.gmail.com>
<DM8PR09MB66779BE5DA062DFB7257BE96B85D2@DM8PR09MB6677.namprd09.prod.outlook.com>
On 2024/11/09 1:53, Murthy Nunna wrote:
> Yes, I know. Exclusive backups are removed.
>
> From release notes of 15:
>
> * Remove long-deprecated *exclusive backup mode* <https://www.postgresql.org/docs/15/continuous-archiving.html#BACKUP-BASE-BACKUP> (David Steele, Nathan Bossart)
>
> If the database server stops abruptly while in this mode, the server could fail to start. The non-exclusive backup mode is considered superior for all purposes. Functions pg_start_backup()/pg_stop_backup() have been renamed to pg_backup_start()/pg_backup_stop(), and the functions pg_backup_start_time() and pg_is_in_backup() have been removed.
>
> Sorry my question was not clear. As per above release notes - If the database server stops abruptly while in this mode, the server could fail to start. However, I crash tested in pg14 (stopped abruptly during exclusive backup) but the cluster still started fine. Pg14 renamed backup_label to backup_label.old and restarted the cluster successfully.
If the server crashes during backup mode and the WAL files indicated by backup_label
as the recovery starting point are removed (due to checkpoints during backup mode),
the server won't start. You can reproduce this issue with the following steps, for example.
--------------------
initdb -D data
pg_ctl -D data start
psql -c "select pg_start_backup('test', true)"
psql -c "select pg_switch_wal(); checkpoint"
psql -c "select pg_switch_wal(); checkpoint"
kill -9 $(head -1 data/postmaster.pid)
pg_ctl -D data start
--------------------
I understand some people still prefer exclusive backups for some reasons, which is
why I developed the pg_exclusive_backup extension that provides functions for
exclusive backups on PostgreSQL 15 or later. However, since this is an unofficial extension,
it's generally better to update your backup method or script to use non-exclusive backups.
https://github.com/MasaoFujii/pg_exclusive_backup
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
view thread (24+ 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: Running rsync backups in pg15
In-Reply-To: <[email protected]>
* 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