@@ -732,7 +732,7 @@ _bt_page_recyclable(Page page)
732
732
* and so must be scanned anyway during replay. We always write a WAL record
733
733
* for the last block in the index, whether or not it contained any items
734
734
* 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.
736
736
*/
737
737
void
738
738
_bt_delitems_vacuum (Relation rel ,Buffer buf ,
@@ -764,8 +764,7 @@ _bt_delitems_vacuum(Relation rel, Buffer buf,
764
764
*/
765
765
opaque -> btpo_flags &= ~BTP_HAS_GARBAGE ;
766
766
767
- if (nitems > 0 )
768
- MarkBufferDirty (buf );
767
+ MarkBufferDirty (buf );
769
768
770
769
/* XLOG stuff */
771
770
if (RelationNeedsWAL (rel ))
@@ -805,11 +804,8 @@ _bt_delitems_vacuum(Relation rel, Buffer buf,
805
804
806
805
recptr = XLogInsert (RM_BTREE_ID ,XLOG_BTREE_VACUUM ,rdata );
807
806
808
- if (nitems > 0 )
809
- {
810
- PageSetLSN (page ,recptr );
811
- PageSetTLI (page ,ThisTimeLineID );
812
- }
807
+ PageSetLSN (page ,recptr );
808
+ PageSetTLI (page ,ThisTimeLineID );
813
809
}
814
810
815
811
END_CRIT_SECTION ();