72000 — snapshot_too_old
72000 is a historical snapshottooold error. PostgreSQL 16.15 still defines and emits it; the SQLSTATE was removed in the PostgreSQL 17 major line. PostgreSQL 16.15 is therefore a later minor snapshot of the last major line, not the removal point.
English manual coverage begins with PostgreSQL 8.1. Source history and runtime observations have their own recorded version boundaries.
Reading PG 16·Select a recorded version
- aliases
- Unknown
- class name
- Snapshot Failure
- condition name
- snapshot_too_old
- lang
- en
- sqlstate
- 72000
Definition PG 16
72000
At a glance {#at-a-glance}
72000 is a historical snapshot_too_old error. PostgreSQL 16.15 still defines and emits it; the SQLSTATE was removed in the PostgreSQL 17 major line. PostgreSQL 16.15 is therefore a later minor snapshot of the last major line, not the removal point.
Meaning {#meaning}
In the fixed 16.15 sources, old_snapshot_threshold is a PGC_POSTMASTER integer GUC; -1 disables the feature. The inline TestForOldSnapshot guard requires a non-negative threshold, an MVCC or TOAST snapshot with a valid LSN, and a page LSN newer than the snapshot. It then calls TestForOldSnapshot_impl, which additionally requires a permanent, non-catalog relation that allows early pruning and compares snapshot.whenTaken with GetOldSnapshotThresholdTimestamp(). If the snapshot is too old, the function raises ERROR 72000 with snapshot too old.
The threshold timestamp is maintained by the old-snapshot time-to-XID mapping used by early pruning and vacuum. The PG16.15 documentation says that dead data older than the threshold may be vacuumed, and a read of a page modified after the snapshot can fail; a materialized cursor or a system catalog may avoid the error. Space retained for detection is not released to the operating system until an explicit operation such as VACUUM FULL.
Messages {#messages}
- ERROR, SQLSTATE
72000:snapshot too old.
There is no current PG17/18 definition row in the locked catalogue. Do not infer a replacement SQLSTATE or claim that an unrelated current error is equivalent.
Diagnosis {#diagnosis}
On PostgreSQL 9.6 through 16, record the major version, SHOW old_snapshot_threshold, transaction snapshot age, relation kind, page/read path, and vacuum or pruning history. Check whether the relation is excluded by the guard (for example a system catalog), whether the read used a materialized cursor or result set, and whether the setting was active at server start. A source-only review cannot establish the threshold or cleanup history on a live cluster.
Response {#response}
This is a statement ERROR; in an explicit transaction, roll back the transaction or to an already-established savepoint before issuing more SQL. The old snapshot cannot be repaired in place: end or shorten the long-running reader, use a suitable startup configuration for the historical major (the GUC is PGC_POSTMASTER, so changing it requires restart), and rerun the whole read unit with an idempotent boundary. On PostgreSQL 17 and later, first identify the current error and mechanism instead of installing a 72000 handler based on the historical name.
Versions {#versions}
The locked definition artifact records 72000 from 9.6.0 through 16.15 and no PG17/18 definition. The 16.15 source documents the GUC and guard; the fixed buffer-manager emitter is from commit 7d3e000c5961a544302072058a1184e9a588837b. The catalogue boundary establishes removal in the PG17 major line, not in minor release 16.15.
Related {#related}
Sources {#sources}
src/backend/storage/buffer/bufmgr.c#L5663-L5675
src/include/storage/bufmgr.h#L363-L392
src/backend/utils/time/snapmgr.c#L1697-L1714
src/backend/utils/misc/guc_tables.c#L3295-L3302
doc/src/sgml/config.sgml#L2827-L2884
The structured evidence record records the historical definition, guard, GUC, documentation, and source/runtime boundary.
Compare versions
SQLSTATE evidence and recorded runtime versions
claims · identity
{
"claim_id": "identity",
"limits": "",
"method": "Read locked historical definition snapshot.",
"position": 0,
"runtime": [],
"sources": [
"src.definition.rel16.artifact"
],
"statement": "72000 is snapshot_too_old in SQLSTATE Class 72 in the locked REL_16_15 definition artifact."
}claims · resolved-paths
{
"claim_id": "resolved-paths",
"limits": "Source confirmation is not natural runtime.",
"method": "Read the inline guard, implementation, and threshold mapping contexts.",
"position": 1,
"runtime": [],
"sources": [
"src.path.0",
"src.path.1",
"src.path.2"
],
"statement": "The PG16.15 guard checks snapshot type, LSN/page ordering, relation eligibility, and threshold timestamp before raising ERROR 72000 with snapshot too old."
}claims · configuration-and-history
{
"claim_id": "configuration-and-history",
"limits": "",
"method": "Read fixed GUC and documentation plus locked version membership.",
"position": 2,
"runtime": [],
"sources": [
"src.path.3",
"src.path.4",
"src.definition.rel16.artifact"
],
"statement": "old_snapshot_threshold is a PGC_POSTMASTER setting, disabled by -1, and the PG16.15 documentation describes the vacuum/read conditions; the catalogue boundary places removal in the PG17 major line."
}claims · history
{
"claim_id": "history",
"limits": "",
"method": "Compare locked version snapshots.",
"position": 3,
"runtime": [],
"sources": [
"src.definition.rel16.artifact"
],
"statement": "The locked definition artifact records 72000 through 16.15 and absent from PG17/18 snapshots; it does not assert a replacement SQLSTATE."
}messages · message.0
{
"limits": "",
"message_id": "message.0",
"path": "",
"position": 0,
"raw": {
"id": "message.0",
"primary_template": "snapshot too old",
"severity_source": "ERROR",
"sources": [
"src.path.0"
],
"sqlstate": "72000"
},
"severity": "ERROR",
"sources": [
"src.path.0"
],
"templates": [
{
"kind": "primary",
"literal": "snapshot too old",
"position": 0,
"role": "",
"template": "snapshot too old"
}
]
}sources · src.definition.rel16.artifact
{
"commit": "",
"docs_url": "",
"kind": "local_artifact",
"location": "",
"path": "raw/definitions/REL_16_15.txt",
"position": 0,
"sha256": "1d1d741b7b7c6dfd8275287e31c79befed75f3b9349e1a42ef0ca147c429ff88",
"source_id": "src.definition.rel16.artifact",
"tag": "REL_16_15",
"url": ""
}sources · src.path.0
{
"commit": "7d3e000c5961a544302072058a1184e9a588837b",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "src/backend/storage/buffer/bufmgr.c",
"position": 1,
"sha256": "dd070e7dfee25fa7beabd63abf35d3116105f0517e83dd0743a9c73d8f50cfec",
"source_id": "src.path.0",
"tag": "REL_16_15",
"url": "https://github.com/postgres/postgres/blob/7d3e000c5961a544302072058a1184e9a588837b/src/backend/storage/buffer/bufmgr.c#L5663"
}sources · src.path.1
{
"commit": "7d3e000c5961a544302072058a1184e9a588837b",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "src/include/storage/bufmgr.h",
"position": 2,
"sha256": "9068c40143d84d3827bae5275bf13f6890d6b232a08922088187b0019ea94587",
"source_id": "src.path.1",
"tag": "REL_16_15",
"url": "https://github.com/postgres/postgres/blob/7d3e000c5961a544302072058a1184e9a588837b/src/include/storage/bufmgr.h#L363"
}sources · src.path.2
{
"commit": "7d3e000c5961a544302072058a1184e9a588837b",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "src/backend/utils/time/snapmgr.c",
"position": 3,
"sha256": "7d87a04c85bd146f639bc4280bbb643f1000af231737f6055cbd4c35984f502c",
"source_id": "src.path.2",
"tag": "REL_16_15",
"url": "https://github.com/postgres/postgres/blob/7d3e000c5961a544302072058a1184e9a588837b/src/backend/utils/time/snapmgr.c#L1697"
}sources · src.path.3
{
"commit": "7d3e000c5961a544302072058a1184e9a588837b",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "src/backend/utils/misc/guc_tables.c",
"position": 4,
"sha256": "2e3efa81095d9fbc77afe7c3c0960f3440f33be768a1ac02461596161cf95468",
"source_id": "src.path.3",
"tag": "REL_16_15",
"url": "https://github.com/postgres/postgres/blob/7d3e000c5961a544302072058a1184e9a588837b/src/backend/utils/misc/guc_tables.c#L3295"
}sources · src.path.4
{
"commit": "7d3e000c5961a544302072058a1184e9a588837b",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "doc/src/sgml/config.sgml",
"position": 5,
"sha256": "b256738f2425571a921f176e6e6d4b936a8164a0c79381c4c216d26c9749514c",
"source_id": "src.path.4",
"tag": "REL_16_15",
"url": "https://github.com/postgres/postgres/blob/7d3e000c5961a544302072058a1184e9a588837b/doc/src/sgml/config.sgml#L2827"
}Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 16 · english-manuals:63d701e90ea317bcc80ade81930daed5f8330c89beed576a3950dc55d865222d
Text language: en · english-manuals:63d701e90ea317bcc80ade81930daed5f8330c89beed576a3950dc55d865222d