@@ -145,16 +145,14 @@ typedef struct HeapPageFreeze
145
145
/*
146
146
* "Freeze" NewRelfrozenXid/NewRelminMxid trackers.
147
147
*
148
- * Trackers used when heap_freeze_execute_prepared freezes the page, and
149
- * when page is "nominally frozen", which happens with pages where every
150
- * call to heap_prepare_freeze_tuple produced no usable freeze plan.
151
- *
152
- * "Nominal freezing" enables vacuumlazy.c's approach of setting a page
153
- * all-frozen in the visibility map when every tuple's 'totally_frozen'
154
- * result is true. That always works in the same way, independent of the
155
- * need to freeze tuples, and without complicating the general rule around
156
- * 'totally_frozen' results (which is that 'totally_frozen' results are
157
- * only to be trusted with a page that goes on to be frozen by caller).
148
+ * Trackers used when heap_freeze_execute_prepared freezes, or when there
149
+ * are zero freeze plans for a page. It is always valid for vacuumlazy.c
150
+ * to freeze any page, by definition. This even includes pages that have
151
+ * no tuples with storage to consider in the first place. That way the
152
+ * 'totally_frozen' results from heap_prepare_freeze_tuple can always be
153
+ * used in the same way, even when no freeze plans need to be executed to
154
+ * "freeze the page". Only the "freeze" path needs to consider the need
155
+ * to set pages all-frozen in the visibility map under this scheme.
158
156
*
159
157
* When we freeze a page, we generally freeze all XIDs < OldestXmin, only
160
158
* leaving behind XIDs that are ineligible for freezing, if any. And so
@@ -178,11 +176,6 @@ typedef struct HeapPageFreeze
178
176
* VACUUM scans a page that isn't cleanup locked. Both code paths are
179
177
* based on the same general idea (do less work for this page during the
180
178
* ongoing VACUUM, at the cost of having to accept older final values).
181
- *
182
- * When vacuumlazy.c caller decides to do "no freeze" processing, it must
183
- * not go on to set the page all-frozen (setting the page all-visible
184
- * could still be okay). heap_prepare_freeze_tuple's 'totally_frozen'
185
- * results can only be used on a page that also gets frozen as instructed.
186
179
*/
187
180
TransactionId NoFreezePageRelfrozenXid ;
188
181
MultiXactId NoFreezePageRelminMxid ;
0 commit comments