1 /*-------------------------------------------------------------------------
4 * rmgr descriptor routines for access/transam/commit_ts.c
6 * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
11 * src/backend/access/rmgrdesc/committsdesc.c
13 *-------------------------------------------------------------------------
17 #include "access/commit_ts.h"
18 #include "utils/timestamp.h"
22 commit_ts_desc(StringInfo buf
, XLogReaderState
*record
)
24 char *rec
= XLogRecGetData(record
);
25 uint8 info
= XLogRecGetInfo(record
) & ~XLR_INFO_MASK
;
27 if (info
== COMMIT_TS_ZEROPAGE
)
31 memcpy(&pageno
, rec
, sizeof(int));
32 appendStringInfo(buf
, "%d", pageno
);
34 else if (info
== COMMIT_TS_TRUNCATE
)
36 xl_commit_ts_truncate
*trunc
= (xl_commit_ts_truncate
*) rec
;
38 appendStringInfo(buf
, "pageno %d, oldestXid %u",
39 trunc
->pageno
, trunc
->oldestXid
);
44 commit_ts_identify(uint8 info
)
48 case COMMIT_TS_ZEROPAGE
:
50 case COMMIT_TS_TRUNCATE
: