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

Commit2b327b6

Browse files
knizhnikkelvich
authored andcommitted
Push responses to WAL sender
1 parente6d3936 commit2b327b6

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

‎multimaster.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2484,13 +2484,14 @@ void MtmUpdateLsnMapping(int node_id, XLogRecPtr end_lsn)
24842484
XLogRecPtrlocal_flush=GetFlushRecPtr();
24852485
MemoryContextold_context=MemoryContextSwitchTo(TopMemoryContext);
24862486

2487-
/* Track commit lsn */
2488-
flushpos= (MtmFlushPosition*)palloc(sizeof(MtmFlushPosition));
2489-
flushpos->node_id=node_id;
2490-
flushpos->local_end=XactLastCommitEnd;
2491-
flushpos->remote_end=end_lsn;
2492-
dlist_push_tail(&MtmLsnMapping,&flushpos->node);
2493-
2487+
if (end_lsn!=InvalidXLogRecPtr) {
2488+
/* Track commit lsn */
2489+
flushpos= (MtmFlushPosition*)palloc(sizeof(MtmFlushPosition));
2490+
flushpos->node_id=node_id;
2491+
flushpos->local_end=XactLastCommitEnd;
2492+
flushpos->remote_end=end_lsn;
2493+
dlist_push_tail(&MtmLsnMapping,&flushpos->node);
2494+
}
24942495
MtmLock(LW_EXCLUSIVE);
24952496
dlist_foreach_modify(iter,&MtmLsnMapping)
24962497
{

‎pglogical_receiver.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ pglogical_receiver_main(Datum main_arg)
571571
if (r==0)
572572
{
573573
int64now=feGetCurrentTimestamp();
574+
MtmUpdateLsnMapping(nodeId,InvalidXLogRecPtr);
574575
sendFeedback(conn,now,nodeId);
575576
continue;
576577
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp