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

Commitd0dcb31

Browse files
committed
Fix broken logic in lazy_vacuum_heap.
As noted by Tom Lane, the previous coding in this area, which Iintroduced in commitbbb6e55, waspoorly tested and caused the vacuum's second heap to go into what wouldhave been an infinite loop but for the fact that it eventually caused amemory allocation failure. This version seems to work better.
1 parent4d0b11a commitd0dcb31

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/backend/commands/vacuumlazy.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,11 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
991991
buf=ReadBufferExtended(onerel,MAIN_FORKNUM,tblk,RBM_NORMAL,
992992
vac_strategy);
993993
if (!ConditionalLockBufferForCleanup(buf))
994+
{
995+
ReleaseBuffer(buf);
996+
++tupindex;
994997
continue;
998+
}
995999
tupindex=lazy_vacuum_page(onerel,tblk,buf,tupindex,vacrelstats);
9961000

9971001
/* Now that we've compacted the page, record its available space */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp