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

Commitae4760d

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 parentca9cb94 commitae4760d

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
@@ -3802,6 +3802,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
38023802
ReleaseBuffer(vmbuffer);
38033803
bms_free(hot_attrs);
38043804
bms_free(key_attrs);
3805+
bms_free(id_attrs);
38053806
returnresult;
38063807
}
38073808

@@ -4268,6 +4269,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
42684269

42694270
bms_free(hot_attrs);
42704271
bms_free(key_attrs);
4272+
bms_free(id_attrs);
42714273

42724274
returnHeapTupleMayBeUpdated;
42734275
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp