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 3e53492

Browse filesBrowse files
author
Amit Kapila
committed
Drop the temporary tuple slots allocated by pgoutput.
In pgoutput, when converting the child table's tuple format to match the parent table's, we temporarily create a new slot to store the converted tuple. However, we missed to drop such temporary slots, leading to resource leakage. Reported-by: Bowen Shi Author: Hou Zhijie Reviewed-by: Amit Kapila Backpatch-through: 15 Discussion: https://postgr.es/m/CAM_vCudv8dc3sjWiPkXx5F2b27UV7_YRKRbtSCcE-pv=cVACGA@mail.gmail.com
1 parent 7467939 commit 3e53492
Copy full SHA for 3e53492

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+10
-0
lines changed

‎src/backend/replication/pgoutput/pgoutput.c

Copy file name to clipboardExpand all lines: src/backend/replication/pgoutput/pgoutput.c
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,6 +1554,16 @@ pgoutput_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
15541554
ancestor = NULL;
15551555
}
15561556

1557+
/* Drop the new slots that were used to store the converted tuples. */
1558+
if (relentry->attrmap)
1559+
{
1560+
if (old_slot)
1561+
ExecDropSingleTupleTableSlot(old_slot);
1562+
1563+
if (new_slot)
1564+
ExecDropSingleTupleTableSlot(new_slot);
1565+
}
1566+
15571567
MemoryContextSwitchTo(old);
15581568
MemoryContextReset(data->context);
15591569
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.