From 744ddc6c6a0fa5d4d6d0e187cadcc632daaefc0e Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Thu, 25 Jul 2024 15:45:06 -0400 Subject: Document restrictions regarding incremental backups and standbys. If you try to take an incremental backup on a standby and there hasn't been much system activity, it might fail. Document why this happens. Also add a hint to the error message you get, to make it more likely that users will understand what has gone wrong. Laurenz Albe and Robert Haas Discussion: https://postgr.es/m/5468641ad821dad7aa3b2d65bf843146443a1b68.camel@cybertec.at --- doc/src/sgml/backup.sgml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index 91da3c26ba0..e4e4c56cf14 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -925,6 +925,17 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0 to manage. For a large database all of which is heavily modified, incremental backups won't be much smaller than full backups. + + + An incremental backup is only possible if replay would begin from a later + checkpoint than for the previous backup upon which it depends. If you + take the incremental backup on the primary, this condition is always + satisfied, because each backup triggers a new checkpoint. On a standby, + replay begins from the most recent restartpoint. Therefore, an + incremental backup of a standby server can fail if there has been very + little activity since the previous backup, since no new restartpoint might + have been created. + -- cgit v1.2.3