require_auth: prepare for multiple SASL mechanisms
[pgsql.git] / src / include / replication / message.h
blob8a0893ea539614c0de0f2eb3c0f55d56ca8153e2
1 /*-------------------------------------------------------------------------
2 * message.h
3 * Exports from replication/logical/message.c
5 * Copyright (c) 2013-2025, PostgreSQL Global Development Group
7 * src/include/replication/message.h
8 *-------------------------------------------------------------------------
9 */
10 #ifndef PG_LOGICAL_MESSAGE_H
11 #define PG_LOGICAL_MESSAGE_H
13 #include "access/xlog.h"
14 #include "access/xlogdefs.h"
15 #include "access/xlogreader.h"
18 * Generic logical decoding message wal record.
20 typedef struct xl_logical_message
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;
30 #define SizeOfLogicalMessage (offsetof(xl_logical_message, message))
32 extern XLogRecPtr LogLogicalMessage(const char *prefix, const char *message,
33 size_t size, bool transactional,
34 bool flush);
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);
42 #endif /* PG_LOGICAL_MESSAGE_H */