PostgreSQL Source Code
git master
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
c
d
g
h
i
k
l
m
p
r
s
t
Functions
Variables
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
c
d
f
h
i
n
o
p
r
s
t
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
message.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
* message.h
3
* Exports from replication/logical/message.c
4
*
5
* Copyright (c) 2013-2025, PostgreSQL Global Development Group
6
*
7
* src/include/replication/message.h
8
*-------------------------------------------------------------------------
9
*/
10
#ifndef PG_LOGICAL_MESSAGE_H
11
#define PG_LOGICAL_MESSAGE_H
12
13
#include "
access/xlog.h
"
14
#include "
access/xlogdefs.h
"
15
#include "
access/xlogreader.h
"
16
17
/*
18
* Generic logical decoding message wal record.
19
*/
20
typedef
struct
xl_logical_message
21
{
22
Oid
dbId
;
/* database Oid emitted from */
23
bool
transactional
;
/* is message transactional? */
24
Size
prefix_size
;
/* length of prefix */
25
Size
message_size
;
/* size of the message */
26
/* payload, including null-terminated prefix of length prefix_size */
27
char
message
[
FLEXIBLE_ARRAY_MEMBER
];
28
}
xl_logical_message
;
29
30
#define SizeOfLogicalMessage (offsetof(xl_logical_message, message))
31
32
extern
XLogRecPtr
LogLogicalMessage
(
const
char
*prefix,
const
char
*message,
33
size_t
size,
bool
transactional,
34
bool
flush);
35
36
/* RMGR API */
37
#define XLOG_LOGICAL_MESSAGE 0x00
38
extern
void
logicalmsg_redo
(
XLogReaderState
*record);
39
extern
void
logicalmsg_desc
(
StringInfo
buf
,
XLogReaderState
*record);
40
extern
const
char
*
logicalmsg_identify
(
uint8
info);
41
42
#endif
/* PG_LOGICAL_MESSAGE_H */
uint8
uint8_t uint8
Definition:
c.h:500
FLEXIBLE_ARRAY_MEMBER
#define FLEXIBLE_ARRAY_MEMBER
Definition:
c.h:434
Size
size_t Size
Definition:
c.h:576
LogLogicalMessage
XLogRecPtr LogLogicalMessage(const char *prefix, const char *message, size_t size, bool transactional, bool flush)
Definition:
message.c:43
xl_logical_message
struct xl_logical_message xl_logical_message
logicalmsg_identify
const char * logicalmsg_identify(uint8 info)
Definition:
logicalmsgdesc.c:46
logicalmsg_desc
void logicalmsg_desc(StringInfo buf, XLogReaderState *record)
Definition:
logicalmsgdesc.c:19
logicalmsg_redo
void logicalmsg_redo(XLogReaderState *record)
Definition:
message.c:87
buf
static char * buf
Definition:
pg_test_fsync.c:72
Oid
unsigned int Oid
Definition:
postgres_ext.h:30
StringInfoData
Definition:
stringinfo.h:47
XLogReaderState
Definition:
xlogreader.h:176
xl_logical_message
Definition:
message.h:21
xl_logical_message::prefix_size
Size prefix_size
Definition:
message.h:24
xl_logical_message::transactional
bool transactional
Definition:
message.h:23
xl_logical_message::dbId
Oid dbId
Definition:
message.h:22
xl_logical_message::message
char message[FLEXIBLE_ARRAY_MEMBER]
Definition:
message.h:27
xl_logical_message::message_size
Size message_size
Definition:
message.h:25
xlog.h
xlogdefs.h
XLogRecPtr
uint64 XLogRecPtr
Definition:
xlogdefs.h:21
xlogreader.h
src
include
replication
message.h
Generated on Mon Apr 21 2025 18:13:26 for PostgreSQL Source Code by
1.9.4