Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
message.h42 linesDownload Raw Back to replication
1/*-------------------------------------------------------------------------2 * message.h3 *	   Exports from replication/logical/message.c4 *5 * Copyright (c) 2013-2023, PostgreSQL Global Development Group6 *7 * src/include/replication/message.h8 *-------------------------------------------------------------------------9 */10#ifndef PG_LOGICAL_MESSAGE_H11#define PG_LOGICAL_MESSAGE_H12 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 */20typedef struct xl_logical_message21{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 32extern XLogRecPtr LogLogicalMessage(const char *prefix, const char *message,33									size_t size, bool transactional);34 35/* RMGR API */36#define XLOG_LOGICAL_MESSAGE	0x0037extern void logicalmsg_redo(XLogReaderState *record);38extern void logicalmsg_desc(StringInfo buf, XLogReaderState *record);39extern const char *logicalmsg_identify(uint8 info);40 41#endif							/* PG_LOGICAL_MESSAGE_H */42 
codekingpro/portable-devtools · Team Ai