@@ -153,8 +153,6 @@ typedef struct LVRelState
153
153
bool aggressive ;
154
154
/* Use visibility map to skip? (disabled by DISABLE_PAGE_SKIPPING) */
155
155
bool skipwithvm ;
156
- /* Wraparound failsafe has been triggered? */
157
- bool failsafe_active ;
158
156
/* Consider index vacuuming bypass optimization? */
159
157
bool consider_bypass_optimization ;
160
158
@@ -391,7 +389,7 @@ heap_vacuum_rel(Relation rel, VacuumParams *params,
391
389
Assert (params -> index_cleanup != VACOPTVALUE_UNSPECIFIED );
392
390
Assert (params -> truncate != VACOPTVALUE_UNSPECIFIED &&
393
391
params -> truncate != VACOPTVALUE_AUTO );
394
- vacrel -> failsafe_active = false;
392
+ VacuumFailsafeActive = false;
395
393
vacrel -> consider_bypass_optimization = true;
396
394
vacrel -> do_index_vacuuming = true;
397
395
vacrel -> do_index_cleanup = true;
@@ -709,7 +707,7 @@ heap_vacuum_rel(Relation rel, VacuumParams *params,
709
707
}
710
708
else
711
709
{
712
- if (!vacrel -> failsafe_active )
710
+ if (!VacuumFailsafeActive )
713
711
appendStringInfoString (& buf , _ ("index scan bypassed: " ));
714
712
else
715
713
appendStringInfoString (& buf , _ ("index scan bypassed by failsafe: " ));
@@ -2293,7 +2291,7 @@ lazy_vacuum(LVRelState *vacrel)
2293
2291
* vacuuming or heap vacuuming. This VACUUM operation won't end up
2294
2292
* back here again.
2295
2293
*/
2296
- Assert (vacrel -> failsafe_active );
2294
+ Assert (VacuumFailsafeActive );
2297
2295
}
2298
2296
2299
2297
/*
@@ -2374,7 +2372,7 @@ lazy_vacuum_all_indexes(LVRelState *vacrel)
2374
2372
*/
2375
2373
Assert (vacrel -> num_index_scans > 0 ||
2376
2374
vacrel -> dead_items -> num_items == vacrel -> lpdead_items );
2377
- Assert (allindexes || vacrel -> failsafe_active );
2375
+ Assert (allindexes || VacuumFailsafeActive );
2378
2376
2379
2377
/*
2380
2378
* Increase and report the number of index scans.
@@ -2616,12 +2614,12 @@ static bool
2616
2614
lazy_check_wraparound_failsafe (LVRelState * vacrel )
2617
2615
{
2618
2616
/* Don't warn more than once per VACUUM */
2619
- if (vacrel -> failsafe_active )
2617
+ if (VacuumFailsafeActive )
2620
2618
return true;
2621
2619
2622
2620
if (unlikely (vacuum_xid_failsafe_check (& vacrel -> cutoffs )))
2623
2621
{
2624
- vacrel -> failsafe_active = true;
2622
+ VacuumFailsafeActive = true;
2625
2623
2626
2624
/*
2627
2625
* Abandon use of a buffer access strategy to allow use of all of
@@ -2820,7 +2818,7 @@ should_attempt_truncation(LVRelState *vacrel)
2820
2818
{
2821
2819
BlockNumber possibly_freeable ;
2822
2820
2823
- if (!vacrel -> do_rel_truncate || vacrel -> failsafe_active ||
2821
+ if (!vacrel -> do_rel_truncate || VacuumFailsafeActive ||
2824
2822
old_snapshot_threshold >= 0 )
2825
2823
return false;
2826
2824
0 commit comments