Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf682eef

Browse files
committed
Use pglogical plugin in multimaster
1 parent75ecbab commitf682eef

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
staticvoidpglogical_write_delete(StringInfoout,PGLogicalOutputData*data,
5757
Relationrel,HeapTupleoldtuple);
5858

59-
#defineIS_REPLICA_IDENTITY 1
60-
6159
staticvoidpglogical_write_tuple(StringInfoout,PGLogicalOutputData*data,
6260
Relationrel,HeapTupletuple);
6361
staticchardecide_datum_transfer(Form_pg_attributeatt,
@@ -105,16 +103,8 @@ pglogical_write_begin(StringInfo out, PGLogicalOutputData *data,
105103
if (MMIsLocalTransaction(txn->xid)) {
106104
mm->isLocal= true;
107105
}else {
108-
uint8flags=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-
uint8flags=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
staticvoid
324324
process_remote_begin(StringInfos)
325325
{
326-
TimestampTzcommit_time;
327-
XLogRecPtrfinal_lsn;
328-
TransactionIdxid;
329-
uint8flags;
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+
TransactionIdxid=pq_getmsgint(s,4);
335327

336328
MMJoinTransaction(xid);
337329
SetCurrentStatementStartTimestamp();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp