Skip to content

Commit 85f0c1e

Browse files
author
Michael Paquier
committed
Block archive backup for a standby node
A standby node only replays WAL, and does not actually archive them so in this case this mode does not have much sense.
1 parent a66e683 commit 85f0c1e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

backup.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,10 @@ do_backup_arclog(parray *backup_list)
455455
if ((uint32) current.stop_lsn == 0)
456456
pg_switch_xlog(&current);
457457

458+
/* Archive backup is not available for a standby */
459+
if (current.is_from_standby)
460+
elog(ERROR_SYSTEM, _("Archive backup not allowed on a standby node"));
461+
458462
/*
459463
* Check if there is a full backup present on current timeline.
460464
* For an incremental or full backup, we are sure that there is one

pg_rman.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ Incremental backup
8282
Backup only files or pages modified after the last verified backup.
8383

8484
Archive WAL backup
85-
Backup only archive WAL files.
85+
Backup only archive WAL files. Archive backup is not available for
86+
a standby node.
8687

8788
It is recommended to verify backup files as soon as possible after backup.
8889
Unverified backup cannot be used in restore and in incremental backup.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy