aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2022-01-25 13:37:19 +0900
committerMichael Paquier <michael@paquier.xyz>2022-01-25 13:37:19 +0900
commit741bd3293389d451adb91190f84914a59142214f (patch)
tree4745d2e50d92325e2f8f835ac5dd052a7b088561 /src/backend/access/transam/xlog.c
parent410aa248e5a883fde4832999cc9b23c7ace0f2ff (diff)
downloadpostgresql-741bd3293389d451adb91190f84914a59142214f.tar.gz
postgresql-741bd3293389d451adb91190f84914a59142214f.zip
Improve errors related to incorrect TLI on checkpoint record replay
WAL replay would cause a hard crash if the timeline expected by a XLOG_END_OF_RECOVERY, a XLOG_CHECKPOINT_ONLINE, or a XLOG_CHECKPOINT_SHUTDOWN record is not the same as the timeline being replayed, using the same error message for all three of them. This commit changes those error messages to use different wordings, adapted to each record type, which is useful when it comes to the debugging of an issue in this area. Author: Amul Sul Reviewed-by: Nathan Bossart, Robert Haas Discussion: https://postgr.es/m/CAAJ_b97i1ZerYC_xW6o_AiDSW5n+sGi8k91Yc8KS8bKWKxjqwQ@mail.gmail.com
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 58922f7edea..dfe2a0bcce9 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -10421,7 +10421,7 @@ xlog_redo(XLogReaderState *record)
*/
if (checkPoint.ThisTimeLineID != replayTLI)
ereport(PANIC,
- (errmsg("unexpected timeline ID %u (should be %u) in checkpoint record",
+ (errmsg("unexpected timeline ID %u (should be %u) in shutdown checkpoint record",
checkPoint.ThisTimeLineID, replayTLI)));
RecoveryRestartPoint(&checkPoint, record);
@@ -10477,7 +10477,7 @@ xlog_redo(XLogReaderState *record)
/* TLI should not change in an on-line checkpoint */
if (checkPoint.ThisTimeLineID != replayTLI)
ereport(PANIC,
- (errmsg("unexpected timeline ID %u (should be %u) in checkpoint record",
+ (errmsg("unexpected timeline ID %u (should be %u) in online checkpoint record",
checkPoint.ThisTimeLineID, replayTLI)));
RecoveryRestartPoint(&checkPoint, record);
@@ -10507,7 +10507,7 @@ xlog_redo(XLogReaderState *record)
*/
if (xlrec.ThisTimeLineID != replayTLI)
ereport(PANIC,
- (errmsg("unexpected timeline ID %u (should be %u) in checkpoint record",
+ (errmsg("unexpected timeline ID %u (should be %u) in end-of-recovery record",
xlrec.ThisTimeLineID, replayTLI)));
}
else if (info == XLOG_NOOP)