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

Commit76fda61

Browse 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 theparent table's, we temporarily create a new slot to store the convertedtuple. However, we missed to drop such temporary slots, leading toresource leakage.Reported-by: Bowen ShiAuthor: Hou ZhijieReviewed-by: Amit KapilaBackpatch-through: 15Discussion:https://postgr.es/m/CAM_vCudv8dc3sjWiPkXx5F2b27UV7_YRKRbtSCcE-pv=cVACGA@mail.gmail.com
1 parenteb144df commit76fda61

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,6 +1587,16 @@ pgoutput_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
15871587
ancestor=NULL;
15881588
}
15891589

1590+
/* Drop the new slots that were used to store the converted tuples. */
1591+
if (relentry->attrmap)
1592+
{
1593+
if (old_slot)
1594+
ExecDropSingleTupleTableSlot(old_slot);
1595+
1596+
if (new_slot)
1597+
ExecDropSingleTupleTableSlot(new_slot);
1598+
}
1599+
15901600
/* Cleanup */
15911601
MemoryContextSwitchTo(old);
15921602
MemoryContextReset(data->context);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp