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

Commit1b315c5

Browse files
committed
Fix buffer pin leak in heap update redo routine.
In a heap update, if the old and new tuple were on different pages, and thenew page no longer existed (because it was subsequently truncated away byvacuum), heap_xlog_update forgot to release the pin on the old buffer. Thisbug was introduced by the "Fix multiple problems in WAL replay" patch,commit3bbf668 (on master branch).With full_page_writes=off, this triggered an "incorrect local pin count"error later in replay, if the old page was vacuumed.This fixes bug #7969, reported by Yunong Xiao. Backpatch to 9.0, like thecommit that introduced this bug.
1 parent96103c6 commit1b315c5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5367,7 +5367,11 @@ newt:;
53675367
ItemPointerGetBlockNumber(&(xlrec->newtid)),
53685368
false);
53695369
if (!BufferIsValid(nbuffer))
5370+
{
5371+
if (BufferIsValid(obuffer))
5372+
UnlockReleaseBuffer(obuffer);
53705373
return;
5374+
}
53715375
page= (Page)BufferGetPage(nbuffer);
53725376

53735377
if (XLByteLE(lsn,PageGetLSN(page)))/* changes are applied */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp