diff options
author | Thomas Munro | 2023-09-05 06:26:12 +0000 |
---|---|---|
committer | Thomas Munro | 2023-09-05 07:53:43 +0000 |
commit | f691f5b80a85c66d715b4340ffabb503eb19393e (patch) | |
tree | 26a06c87096de2f9571956b4370ccbf1852d4cba /src/backend/commands | |
parent | aa0d3504560d40f4300a3d49d1c6c3bfc3b894e5 (diff) |
Remove the "snapshot too old" feature.
Remove the old_snapshot_threshold setting and mechanism for producing
the error "snapshot too old", originally added by commit 848ef42b.
Unfortunately it had a number of known problems in terms of correctness
and performance, mostly reported by Andres in the course of his work on
snapshot scalability. We agreed to remove it, after a long period
without an active plan to fix it.
This is certainly a desirable feature, and someone might propose a new
or improved implementation in the future.
Reported-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CACG%3DezYV%2BEvO135fLRdVn-ZusfVsTY6cH1OZqWtezuEYH6ciQA%40mail.gmail.com
Discussion: https://postgr.es/m/20200401064008.qob7bfnnbu4w5cw4%40alap3.anarazel.de
Discussion: https://postgr.es/m/CA%2BTgmoY%3Daqf0zjTD%2B3dUWYkgMiNDegDLFjo%2B6ze%3DWtpik%2B3XqA%40mail.gmail.com
Diffstat (limited to 'src/backend/commands')
-rw-r--r-- | src/backend/commands/vacuum.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index 69ac276687b..8bdbee68417 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -1110,25 +1110,6 @@ vacuum_get_cutoffs(Relation rel, const VacuumParams *params, */ cutoffs->OldestXmin = GetOldestNonRemovableTransactionId(rel); - if (OldSnapshotThresholdActive()) - { - TransactionId limit_xmin; - TimestampTz limit_ts; - - if (TransactionIdLimitedForOldSnapshots(cutoffs->OldestXmin, rel, - &limit_xmin, &limit_ts)) - { - /* - * TODO: We should only set the threshold if we are pruning on the - * basis of the increased limits. Not as crucial here as it is - * for opportunistic pruning (which often happens at a much higher - * frequency), but would still be a significant improvement. - */ - SetOldSnapshotThresholdTimestamp(limit_ts, limit_xmin); - cutoffs->OldestXmin = limit_xmin; - } - } - Assert(TransactionIdIsNormal(cutoffs->OldestXmin)); /* Acquire OldestMxact */ |