mirror of
https://github.com/postgres/postgres.git
synced 2025-08-18 12:22:09 +03:00
Include previous TLI in end-of-recovery and shutdown checkpoint records.
This isn't used for anything but a sanity check at the moment, but it could be highly valuable for debugging purposes. It could also be used to recreate timeline history by traversing WAL, which seems useful.
This commit is contained in:
@@ -41,11 +41,12 @@ xlog_desc(StringInfo buf, uint8 xl_info, char *rec)
|
||||
CheckPoint *checkpoint = (CheckPoint *) rec;
|
||||
|
||||
appendStringInfo(buf, "checkpoint: redo %X/%X; "
|
||||
"tli %u; fpw %s; xid %u/%u; oid %u; multi %u; offset %u; "
|
||||
"tli %u; prev tli %u; fpw %s; xid %u/%u; oid %u; multi %u; offset %u; "
|
||||
"oldest xid %u in DB %u; oldest multi %u in DB %u; "
|
||||
"oldest running xid %u; %s",
|
||||
(uint32) (checkpoint->redo >> 32), (uint32) checkpoint->redo,
|
||||
checkpoint->ThisTimeLineID,
|
||||
checkpoint->PrevTimeLineID,
|
||||
checkpoint->fullPageWrites ? "true" : "false",
|
||||
checkpoint->nextXidEpoch, checkpoint->nextXid,
|
||||
checkpoint->nextOid,
|
||||
@@ -125,8 +126,8 @@ xlog_desc(StringInfo buf, uint8 xl_info, char *rec)
|
||||
xl_end_of_recovery xlrec;
|
||||
|
||||
memcpy(&xlrec, rec, sizeof(xl_end_of_recovery));
|
||||
appendStringInfo(buf, "end_of_recovery: tli %u; time %s",
|
||||
xlrec.ThisTimeLineID,
|
||||
appendStringInfo(buf, "end_of_recovery: tli %u; prev tli %u; time %s",
|
||||
xlrec.ThisTimeLineID, xlrec.PrevTimeLineID,
|
||||
timestamptz_to_str(xlrec.end_time));
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user