Age Owner Branch data TLA Line data Source code
1 : : /*-------------------------------------------------------------------------
2 : : *
3 : : * seqdesc.c
4 : : * rmgr descriptor routines for commands/sequence.c
5 : : *
6 : : * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
7 : : * Portions Copyright (c) 1994, Regents of the University of California
8 : : *
9 : : *
10 : : * IDENTIFICATION
11 : : * src/backend/access/rmgrdesc/seqdesc.c
12 : : *
13 : : *-------------------------------------------------------------------------
14 : : */
15 : : #include "postgres.h"
16 : :
17 : : #include "commands/sequence_xlog.h"
18 : :
19 : :
20 : : void
4184 heikki.linnakangas@i 21 :CBC 266 : seq_desc(StringInfo buf, XLogReaderState *record)
22 : : {
4343 23 : 266 : char *rec = XLogRecGetData(record);
4184 24 : 266 : uint8 info = XLogRecGetInfo(record) & ~XLR_INFO_MASK;
4906 alvherre@alvh.no-ip. 25 : 266 : xl_seq_rec *xlrec = (xl_seq_rec *) rec;
26 : :
27 [ + - ]: 266 : if (info == XLOG_SEQ_LOG)
1315 rhaas@postgresql.org 28 : 266 : appendStringInfo(buf, "rel %u/%u/%u",
29 : : xlrec->locator.spcOid, xlrec->locator.dbOid,
30 : : xlrec->locator.relNumber);
4246 andres@anarazel.de 31 : 266 : }
32 : :
33 : : const char *
34 : 269 : seq_identify(uint8 info)
35 : : {
36 : 269 : const char *id = NULL;
37 : :
4243 38 [ + - ]: 269 : switch (info & ~XLR_INFO_MASK)
39 : : {
4246 40 : 269 : case XLOG_SEQ_LOG:
41 : 269 : id = "LOG";
42 : 269 : break;
43 : : }
44 : :
45 : 269 : return id;
46 : : }
|