Age Owner Branch data TLA Line data Source code
1 : : /*-------------------------------------------------------------------------
2 : : *
3 : : * relmapdesc.c
4 : : * rmgr descriptor routines for utils/cache/relmapper.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/relmapdesc.c
12 : : *
13 : : *-------------------------------------------------------------------------
14 : : */
15 : : #include "postgres.h"
16 : :
17 : : #include "utils/relmapper.h"
18 : :
19 : : void
4184 heikki.linnakangas@i 20 :CBC 28 : relmap_desc(StringInfo buf, XLogReaderState *record)
21 : : {
4343 22 : 28 : char *rec = XLogRecGetData(record);
4184 23 : 28 : uint8 info = XLogRecGetInfo(record) & ~XLR_INFO_MASK;
24 : :
4906 alvherre@alvh.no-ip. 25 [ + - ]: 28 : if (info == XLOG_RELMAP_UPDATE)
26 : : {
27 : 28 : xl_relmap_update *xlrec = (xl_relmap_update *) rec;
28 : :
1462 peter@eisentraut.org 29 : 28 : appendStringInfo(buf, "database %u tablespace %u size %d",
30 : : xlrec->dbid, xlrec->tsid, xlrec->nbytes);
31 : : }
4246 andres@anarazel.de 32 : 28 : }
33 : :
34 : : const char *
35 : 31 : relmap_identify(uint8 info)
36 : : {
37 : 31 : const char *id = NULL;
38 : :
4243 39 [ + - ]: 31 : switch (info & ~XLR_INFO_MASK)
40 : : {
4246 41 : 31 : case XLOG_RELMAP_UPDATE:
42 : 31 : id = "UPDATE";
43 : 31 : break;
44 : : }
45 : :
46 : 31 : return id;
47 : : }
|