PostgreSQL Source Code
git master
seqdesc.c
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* seqdesc.c
4
* rmgr descriptor routines for commands/sequence.c
5
*
6
* Portions Copyright (c) 1996-2024, 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.h
"
18
19
20
void
21
seq_desc
(
StringInfo
buf
,
XLogReaderState
*record)
22
{
23
char
*rec =
XLogRecGetData
(record);
24
uint8
info =
XLogRecGetInfo
(record) & ~
XLR_INFO_MASK
;
25
xl_seq_rec
*xlrec = (
xl_seq_rec
*) rec;
26
27
if
(info ==
XLOG_SEQ_LOG
)
28
appendStringInfo
(
buf
,
"rel %u/%u/%u"
,
29
xlrec->
locator
.
spcOid
, xlrec->
locator
.
dbOid
,
30
xlrec->
locator
.
relNumber
);
31
}
32
33
const
char
*
34
seq_identify
(
uint8
info)
35
{
36
const
char
*
id
= NULL;
37
38
switch
(info & ~
XLR_INFO_MASK
)
39
{
40
case
XLOG_SEQ_LOG
:
41
id
=
"LOG"
;
42
break
;
43
}
44
45
return
id;
46
}
uint8
unsigned char uint8
Definition:
c.h:504
sequence.h
XLOG_SEQ_LOG
#define XLOG_SEQ_LOG
Definition:
sequence.h:46
buf
static char * buf
Definition:
pg_test_fsync.c:73
postgres.h
seq_identify
const char * seq_identify(uint8 info)
Definition:
seqdesc.c:34
seq_desc
void seq_desc(StringInfo buf, XLogReaderState *record)
Definition:
seqdesc.c:21
appendStringInfo
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition:
stringinfo.c:97
RelFileLocator::spcOid
Oid spcOid
Definition:
relfilelocator.h:60
RelFileLocator::relNumber
RelFileNumber relNumber
Definition:
relfilelocator.h:62
RelFileLocator::dbOid
Oid dbOid
Definition:
relfilelocator.h:61
StringInfoData
Definition:
stringinfo.h:47
XLogReaderState
Definition:
xlogreader.h:176
xl_seq_rec
Definition:
sequence.h:49
xl_seq_rec::locator
RelFileLocator locator
Definition:
sequence.h:50
XLogRecGetInfo
#define XLogRecGetInfo(decoder)
Definition:
xlogreader.h:410
XLogRecGetData
#define XLogRecGetData(decoder)
Definition:
xlogreader.h:415
XLR_INFO_MASK
#define XLR_INFO_MASK
Definition:
xlogrecord.h:62
src
backend
access
rmgrdesc
seqdesc.c
Generated on Thu Sep 19 2024 12:13:17 for PostgreSQL Source Code by
1.9.1