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

Commitf25a458

Browse files
author
Amit Kapila
committed
Avoid sending prepare multiple times while decoding.
We send the prepare for the concurrently aborted xacts so that later whenrollback prepared is decoded and sent, the downstream should be able torollback such a xact. For 'streaming' case (when we send changes forin-progress transactions), we were sending prepare twice when concurrentabort was detected.Author: Peter SmithReviewed-by: Amit KapilaDiscussion:https://postgr.es/m/f82133c6-6055-b400-7922-97dae9f2b50b@enterprisedb.com
1 parent3cbea58 commitf25a458

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/backend/replication/logical/reorderbuffer.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2690,8 +2690,11 @@ ReorderBufferPrepare(ReorderBuffer *rb, TransactionId xid,
26902690
* We send the prepare for the concurrently aborted xacts so that later
26912691
* when rollback prepared is decoded and sent, the downstream should be
26922692
* able to rollback such a xact. See comments atop DecodePrepare.
2693+
*
2694+
* Note, for the concurrent_abort + streaming case a stream_prepare was
2695+
* already sent within the ReorderBufferReplay call above.
26932696
*/
2694-
if (txn->concurrent_abort)
2697+
if (txn->concurrent_abort&& !rbtxn_is_streamed(txn))
26952698
rb->prepare(rb,txn,txn->final_lsn);
26962699
}
26972700

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp