Remove the "snapshot too old" feature.

Thomas Munro <tmunro@postgresql.org>

Commit: f691f5b80a85c66d715b4340ffabb503eb19393e
Author: Thomas Munro <tmunro@postgresql.org>
Date: 2023-09-05T07:53:43Z
Releases: 17.0
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

Files

PathChange+/−
contrib/bloom/blscan.c modified +0 −1
contrib/Makefile modified +0 −1
contrib/meson.build modified +0 −1
contrib/old_snapshot/Makefile deleted +0 −21
contrib/old_snapshot/meson.build deleted +0 −23
contrib/old_snapshot/old_snapshot--1.0.sql deleted +0 −14
contrib/old_snapshot/old_snapshot.control deleted +0 −5
contrib/old_snapshot/time_mapping.c deleted +0 −142
doc/src/sgml/config.sgml modified +0 −69
doc/src/sgml/contrib.sgml modified +0 −1
doc/src/sgml/filelist.sgml modified +0 −1
doc/src/sgml/oldsnapshot.sgml deleted +0 −33
src/backend/access/brin/brin_revmap.c modified +0 −7
src/backend/access/gin/ginbtree.c modified +0 −2
src/backend/access/gin/ginget.c modified +0 −4
src/backend/access/gist/gistget.c modified +0 −1
src/backend/access/hash/hashsearch.c modified +0 −6
src/backend/access/heap/heapam.c modified +0 −9
src/backend/access/heap/pruneheap.c modified +4 −116
src/backend/access/heap/vacuumlazy.c modified +2 −3
src/backend/access/nbtree/nbtsearch.c modified +0 −9
src/backend/access/spgist/spgscan.c modified +0 −1
src/backend/catalog/index.c modified +10 −18
src/backend/commands/vacuum.c modified +0 −19
src/backend/storage/buffer/bufmgr.c modified +0 −17
src/backend/storage/ipc/ipci.c modified +0 −2
src/backend/storage/ipc/procarray.c modified +4 −32
src/backend/storage/lmgr/lwlocknames.txt modified +1 −1
src/backend/utils/activity/wait_event_names.txt modified +0 −1
src/backend/utils/errcodes.txt modified +0 −4
src/backend/utils/misc/guc_tables.c modified +0 −11
src/backend/utils/misc/postgresql.conf.sample modified +0 −2
src/backend/utils/time/snapmgr.c modified +0 −468
src/include/access/heapam.h modified +0 −2
src/include/storage/bufmgr.h modified +0 −36
src/include/utils/old_snapshot.h deleted +0 −75
src/include/utils/snapmgr.h modified +0 −49
src/test/modules/Makefile modified +0 −1
src/test/modules/meson.build modified +0 −1
src/test/modules/snapshot_too_old/expected/sto_using_cursor.out deleted +0 −19
src/test/modules/snapshot_too_old/expected/sto_using_hash_index.out deleted +0 −19
src/test/modules/snapshot_too_old/expected/sto_using_select.out deleted +0 −18
src/test/modules/snapshot_too_old/.gitignore deleted +0 −3
src/test/modules/snapshot_too_old/Makefile deleted +0 −28
src/test/modules/snapshot_too_old/meson.build deleted +0 −19
src/test/modules/snapshot_too_old/specs/sto_using_cursor.spec deleted +0 −38
src/test/modules/snapshot_too_old/specs/sto_using_hash_index.spec deleted +0 −31
src/test/modules/snapshot_too_old/specs/sto_using_select.spec deleted +0 −37
src/test/modules/snapshot_too_old/sto.conf deleted +0 −2
src/tools/pgindent/typedefs.list modified +0 −2

Documentation touched

Discussion