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

Commit2b6df05

Browse files
author
Amit Kapila
committed
Remove the streaming files for incomplete xacts after restart.
After restart, we try to stream the changes for large transactions thatwere not sent before server crash and restart. However, we forget to sendthe abort message for such transactions. This leads to spurious streamingfiles on the subscriber which won't be cleaned till the apply worker orthe subscriber server restarts.Reported-by: Dilip KumarAuthor: Hou ZhijieReviewed-by: Dilip Kumar and Amit KapilaBackpatch-through: 14Discussion:https://postgr.es/m/OS0PR01MB5716A773F46768A1B75BE24394FB9@OS0PR01MB5716.jpnprd01.prod.outlook.com
1 parenta14a583 commit2b6df05

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2936,6 +2936,10 @@ ReorderBufferAbortOld(ReorderBuffer *rb, TransactionId oldestRunningXid)
29362936
{
29372937
elog(DEBUG2,"aborting old transaction %u",txn->xid);
29382938

2939+
/* Notify the remote node about the crash/immediate restart. */
2940+
if (rbtxn_is_streamed(txn))
2941+
rb->stream_abort(rb,txn,InvalidXLogRecPtr);
2942+
29392943
/* remove potential on-disk data, and deallocate this tx */
29402944
ReorderBufferCleanupTXN(rb,txn);
29412945
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp