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

Commit3e53492

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 parent7467939 commit3e53492

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
@@ -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)

[8]ページ先頭

©2009-2025 Movatter.jp