diff options
author | Robert Haas <rhaas@postgresql.org> | 2019-03-29 08:09:39 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2019-03-29 08:15:16 -0400 |
commit | c900c15269f0f900d666bd1b0c6df3eff5098678 (patch) | |
tree | cbf5141d55e1213f9b8f9bdccb496385cd46a014 /src/backend/access/transam/xlog.c | |
parent | bb76134b08aa46cdeb0ff1e6d7b392d315529a8c (diff) | |
download | postgresql-c900c15269f0f900d666bd1b0c6df3eff5098678.tar.gz postgresql-c900c15269f0f900d666bd1b0c6df3eff5098678.zip |
Warn more strongly about the dangers of exclusive backup mode.
Especially, warn about the hazards of mishandling the backup_label
file. Adjust a couple of server messages to be more clear about
the hazards associated with removing backup_label files, too.
David Steele and Robert Haas, reviewed by Laurenz Albe, Martín
Marqués, Peter Eisentraut, and Magnus Hagander.
Discussion: http://postgr.es/m/7d85c387-000e-16f0-e00b-50bf83c22127@pgmasters.net
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 19d7911ec50..9840a55c10a 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -6364,14 +6364,20 @@ StartupXLOG(void) if (!ReadRecord(xlogreader, checkPoint.redo, LOG, false)) ereport(FATAL, (errmsg("could not find redo location referenced by checkpoint record"), - errhint("If you are not restoring from a backup, try removing the file \"%s/backup_label\".", DataDir))); + errhint("If you are restoring from a backup, touch \"%s/recovery.signal\" and add required recovery options.\n" + "If you are not restoring from a backup, try removing the file \"%s/backup_label\".\n" + "Be careful: removing \"%s/backup_label\" will result in a corrupt cluster if restoring from a backup.", + DataDir, DataDir, DataDir))); } } else { ereport(FATAL, (errmsg("could not locate required checkpoint record"), - errhint("If you are not restoring from a backup, try removing the file \"%s/backup_label\".", DataDir))); + errhint("If you are restoring from a backup, touch \"%s/recovery.signal\" and add required recovery options.\n" + "If you are not restoring from a backup, try removing the file \"%s/backup_label\".\n" + "Be careful: removing \"%s/backup_label\" will result in a corrupt cluster if restoring from a backup.", + DataDir, DataDir, DataDir))); wasShutdown = false; /* keep compiler quiet */ } |