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

Commit2d2841a

Browse files
Continue to allow VACUUM to mark last block of index dirty
even when there is no work to do. Further analysis required.Revert of patchc1458cc
1 parenta4ffcc8 commit2d2841a

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

‎src/backend/access/nbtree/nbtpage.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ _bt_page_recyclable(Page page)
732732
* and so must be scanned anyway during replay. We always write a WAL record
733733
* for the last block in the index, whether or not it contained any items
734734
* to be removed. This allows us to scan right up to end of index to
735-
* ensure correct locking. That is the only time we are called with nitems==0.
735+
* ensure correct locking.
736736
*/
737737
void
738738
_bt_delitems_vacuum(Relationrel,Bufferbuf,
@@ -764,8 +764,7 @@ _bt_delitems_vacuum(Relation rel, Buffer buf,
764764
*/
765765
opaque->btpo_flags &= ~BTP_HAS_GARBAGE;
766766

767-
if (nitems>0)
768-
MarkBufferDirty(buf);
767+
MarkBufferDirty(buf);
769768

770769
/* XLOG stuff */
771770
if (RelationNeedsWAL(rel))
@@ -805,11 +804,8 @@ _bt_delitems_vacuum(Relation rel, Buffer buf,
805804

806805
recptr=XLogInsert(RM_BTREE_ID,XLOG_BTREE_VACUUM,rdata);
807806

808-
if (nitems>0)
809-
{
810-
PageSetLSN(page,recptr);
811-
PageSetTLI(page,ThisTimeLineID);
812-
}
807+
PageSetLSN(page,recptr);
808+
PageSetTLI(page,ThisTimeLineID);
813809
}
814810

815811
END_CRIT_SECTION();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp