diff options
| author | Peter Geoghegan | 2023-01-26 06:22:27 +0000 |
|---|---|---|
| committer | Peter Geoghegan | 2023-01-26 06:22:27 +0000 |
| commit | 6c6b4972664491de408670354fdbccc7c83a1c89 (patch) | |
| tree | 00757e1dff63538e83a4a2be76559bd7006797b0 /src/backend/commands/vacuum.c | |
| parent | 8b5f36bb6c16c030561d83b74b8c3270dbf48b68 (diff) | |
Revert "Add eager and lazy freezing strategies to VACUUM."
This reverts commit 4d417992613949af35530b4e8e83670c4e67e1b2. Broad
concerns about regressions caused by eager freezing strategy have been
raised. Whether or not these concerns can be worked through in any time
frame is far from certain.
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/commands/vacuum.c')
| -rw-r--r-- | src/backend/commands/vacuum.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index 033a9db90ce..7b1a4b127eb 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -68,7 +68,6 @@ int vacuum_freeze_min_age; int vacuum_freeze_table_age; int vacuum_multixact_freeze_min_age; int vacuum_multixact_freeze_table_age; -int vacuum_freeze_strategy_threshold; int vacuum_failsafe_age; int vacuum_multixact_failsafe_age; @@ -265,7 +264,6 @@ ExecVacuum(ParseState *pstate, VacuumStmt *vacstmt, bool isTopLevel) params.freeze_table_age = 0; params.multixact_freeze_min_age = 0; params.multixact_freeze_table_age = 0; - params.freeze_strategy_threshold = 0; } else { @@ -273,7 +271,6 @@ ExecVacuum(ParseState *pstate, VacuumStmt *vacstmt, bool isTopLevel) params.freeze_table_age = -1; params.multixact_freeze_min_age = -1; params.multixact_freeze_table_age = -1; - params.freeze_strategy_threshold = -1; } /* user-invoked vacuum is never "for wraparound" */ @@ -965,9 +962,7 @@ vacuum_get_cutoffs(Relation rel, const VacuumParams *params, multixact_freeze_min_age, freeze_table_age, multixact_freeze_table_age, - effective_multixact_freeze_max_age, - freeze_strategy_threshold; - uint64 threshold_strategy_pages; + effective_multixact_freeze_max_age; TransactionId nextXID, safeOldestXmin, aggressiveXIDCutoff; @@ -980,7 +975,6 @@ vacuum_get_cutoffs(Relation rel, const VacuumParams *params, multixact_freeze_min_age = params->multixact_freeze_min_age; freeze_table_age = params->freeze_table_age; multixact_freeze_table_age = params->multixact_freeze_table_age; - freeze_strategy_threshold = params->freeze_strategy_threshold; /* Set pg_class fields in cutoffs */ cutoffs->relfrozenxid = rel->rd_rel->relfrozenxid; @@ -1096,23 +1090,6 @@ vacuum_get_cutoffs(Relation rel, const VacuumParams *params, cutoffs->MultiXactCutoff = cutoffs->OldestMxact; /* - * Determine the freeze_strategy_threshold to use: as specified by the - * caller, or vacuum_freeze_strategy_threshold - */ - if (freeze_strategy_threshold < 0) - freeze_strategy_threshold = vacuum_freeze_strategy_threshold; - Assert(freeze_strategy_threshold >= 0); - - /* - * Convert MB-based freeze_strategy_threshold to page-based value used by - * our vacuumlazy.c caller, while being careful to avoid overflow - */ - threshold_strategy_pages = - ((uint64) freeze_strategy_threshold * 1024 * 1024) / BLCKSZ; - threshold_strategy_pages = Min(threshold_strategy_pages, MaxBlockNumber); - cutoffs->freeze_strategy_threshold_pages = threshold_strategy_pages; - - /* * Finally, figure out if caller needs to do an aggressive VACUUM or not. * * Determine the table freeze age to use: as specified by the caller, or |
