mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
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
This commit is contained in:
@ -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 */
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user