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

Appearance settings

Commit 2b6df05

Browse filesBrowse 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 that were not sent before server crash and restart. However, we forget to send the abort message for such transactions. This leads to spurious streaming files on the subscriber which won't be cleaned till the apply worker or the subscriber server restarts. Reported-by: Dilip Kumar Author: Hou Zhijie Reviewed-by: Dilip Kumar and Amit Kapila Backpatch-through: 14 Discussion: https://postgr.es/m/OS0PR01MB5716A773F46768A1B75BE24394FB9@OS0PR01MB5716.jpnprd01.prod.outlook.com
1 parent a14a583 commit 2b6df05
Copy full SHA for 2b6df05

File tree

Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed

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

Copy file name to clipboardExpand all lines: src/backend/replication/logical/reorderbuffer.c
+4Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.