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

Commit9e0d9a2

Browse files
author
Amit Kapila
committed
Fix memory leak due to LogicalRepRelMapEntry.attrmap.
When rebuilding the relation mapping on subscribers, we were not releasingthe attribute mapping's memory which was no longer required.The attribute mapping used in logical tuple conversion was refactored inPG13 (by commite1551f9) but we forgot to update the related code thatfrees the attribute map.Author: Hou ZhijieReviewed-by: Amit Langote, Amit Kapila, Shi yuBackpatch-through: 10, where it was introducedDiscussion:https://postgr.es/m/OSZPR01MB6310F46CD425A967E4AEF736FDA49@OSZPR01MB6310.jpnprd01.prod.outlook.com
1 parent5ad46ae commit9e0d9a2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,13 @@ logicalrep_rel_open(LogicalRepRelId remoteid, LOCKMODE lockmode)
259259
MemoryContextoldctx;
260260
inti;
261261

262+
/* Release the no-longer-useful attrmap, if any. */
263+
if (entry->attrmap)
264+
{
265+
pfree(entry->attrmap);
266+
entry->attrmap=NULL;
267+
}
268+
262269
/* Try to find and lock the relation by name. */
263270
relid=RangeVarGetRelid(makeRangeVar(remoterel->nspname,
264271
remoterel->relname,-1),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp