1 /*-------------------------------------------------------------------------
4 * rmgr descriptor routines for replication/logical/message.c
6 * Portions Copyright (c) 2015-2017, PostgreSQL Global Development Group
10 * src/backend/access/rmgrdesc/logicalmsgdesc.c
12 *-------------------------------------------------------------------------
16 #include "replication/message.h"
19 logicalmsg_desc(StringInfo buf, XLogReaderState *record)
21 char *rec = XLogRecGetData(record);
22 uint8 info = XLogRecGetInfo(record) & ~XLR_INFO_MASK;
24 if (info == XLOG_LOGICAL_MESSAGE)
26 xl_logical_message *xlrec = (xl_logical_message *) rec;
28 appendStringInfo(buf, "%s message size %zu bytes",
29 xlrec->transactional ? "transactional" : "nontransactional",
35 logicalmsg_identify(uint8 info)
37 if ((info & ~XLR_INFO_MASK) == XLOG_LOGICAL_MESSAGE)