Skip to content

Commit f682eef

Browse files
committed
Use pglogical plugin in multimaster
1 parent 75ecbab commit f682eef

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

contrib/multimaster/pglogical_proto.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ static void pglogical_write_update(StringInfo out, PGLogicalOutputData *data,
5656
static void pglogical_write_delete(StringInfo out, PGLogicalOutputData *data,
5757
Relation rel, HeapTuple oldtuple);
5858

59-
#define IS_REPLICA_IDENTITY 1
60-
6159
static void pglogical_write_tuple(StringInfo out, PGLogicalOutputData *data,
6260
Relation rel, HeapTuple tuple);
6361
static char decide_datum_transfer(Form_pg_attribute att,
@@ -105,16 +103,8 @@ pglogical_write_begin(StringInfo out, PGLogicalOutputData *data,
105103
if (MMIsLocalTransaction(txn->xid)) {
106104
mm->isLocal = true;
107105
} else {
108-
uint8 flags = 0;
109106
mm->isLocal = false;
110107
pq_sendbyte(out, 'B'); /* BEGIN */
111-
112-
/* send the flags field its self */
113-
pq_sendbyte(out, flags);
114-
115-
/* fixed fields */
116-
pq_sendint64(out, txn->final_lsn);
117-
pq_sendint64(out, txn->commit_time);
118108
pq_sendint(out, txn->xid, 4);
119109
}
120110
}
@@ -128,16 +118,7 @@ pglogical_write_commit(StringInfo out, PGLogicalOutputData *data,
128118
{
129119
PGLogicalProtoMM* mm = (PGLogicalProtoMM*)data->api;
130120
if (!mm->isLocal) {
131-
uint8 flags = 0;
132121
pq_sendbyte(out, 'C'); /* sending COMMIT */
133-
134-
/* send the flags field */
135-
pq_sendbyte(out, flags);
136-
137-
/* send fixed fields */
138-
pq_sendint64(out, commit_lsn);
139-
pq_sendint64(out, txn->end_lsn);
140-
pq_sendint64(out, txn->commit_time);
141122
}
142123
}
143124

contrib/multimaster/pglogical_receiver.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -323,15 +323,7 @@ create_rel_estate(Relation rel)
323323
static void
324324
process_remote_begin(StringInfo s)
325325
{
326-
TimestampTz commit_time;
327-
XLogRecPtr final_lsn;
328-
TransactionId xid;
329-
uint8 flags;
330-
331-
flags = pq_getmsgbyte(s);
332-
final_lsn = pq_getmsgint64(s);
333-
commit_time = pq_getmsgint64(s);
334-
xid = pq_getmsgint(s, 4);
326+
TransactionId xid = pq_getmsgint(s, 4);
335327

336328
MMJoinTransaction(xid);
337329
SetCurrentStatementStartTimestamp();

0 commit comments

Comments
 (0)