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

Commit46bd14a

Browse files
committed
Fix small query-lifespan memory leak in bulk updates.
When there is an identifiable REPLICA IDENTITY index on the target table,heap_update leaks the id_attrs bitmapset. That's not many bytes, but itadds up over enough rows, since the code typically runs in a query-lifespancontext. Bug introduced in commite55704d, which did a rather poor jobof cloning the existing use-pattern for RelationGetIndexAttrBitmap().Per bug #14293 from Zhou Digoal. Back-patch to 9.4 where the bug wasintroduced.Report: <20160824114320.15676.45171@wrigleys.postgresql.org>
1 parent25fe5f7 commit46bd14a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎src/backend/access/heap/heapam.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3579,6 +3579,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
35793579
ReleaseBuffer(vmbuffer);
35803580
bms_free(hot_attrs);
35813581
bms_free(key_attrs);
3582+
bms_free(id_attrs);
35823583
returnresult;
35833584
}
35843585

@@ -4031,6 +4032,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
40314032

40324033
bms_free(hot_attrs);
40334034
bms_free(key_attrs);
4035+
bms_free(id_attrs);
40344036

40354037
returnHeapTupleMayBeUpdated;
40364038
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp