mirror of
https://github.com/postgres/postgres.git
synced 2025-11-21 00:42:43 +03:00
Revert "Add eager and lazy freezing strategies to VACUUM."
This reverts commit 4d41799261. 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/20230126004347.gepcmyenk2csxrri@awork3.anarazel.de
This commit is contained in:
@@ -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;
|
||||
@@ -1095,23 +1089,6 @@ vacuum_get_cutoffs(Relation rel, const VacuumParams *params,
|
||||
if (MultiXactIdPrecedes(cutoffs->OldestMxact, cutoffs->MultiXactCutoff))
|
||||
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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user