# Primary-source review and provenance

Reviewed 2026-10-21. This research concerns PostgreSQL 16, specifically the
Ubuntu 16.15-0ubuntu0.24.04.1 binaries actually executed. It makes no claim about
a new PostgreSQL defect or the defaults of other major versions.

## Sources and claim mapping

1. [TOAST, PostgreSQL 16](https://www.postgresql.org/docs/16/storage-toast.html),
   section 73.2.1. Separates the table's external-value pointer from chunk rows.
   The pointer records size metadata. EXTERNAL permits out-of-line storage without
   compression and allows partial fetching for substring operations.
2. [amcheck, PostgreSQL 16](https://www.postgresql.org/docs/16/amcheck.html),
   verify_heapam and Using amcheck Effectively. Structural checking, optional
   TOAST-pointer checks, and limits on inferring absence of corruption. An
   underlying read failure can raise an error instead of returning a report row.
3. [pg_amcheck, PostgreSQL 16](https://www.postgresql.org/docs/16/app-pgamcheck.html),
   --no-dependent-toast and --exclude-toast-pointers. These control different
   work: relation selection and following external-value references. We test
   each separately and both together. All four variants also use
   --no-dependent-indexes to keep the question focused on heap/TOAST coverage.
4. [Data checksums, PostgreSQL 16](https://www.postgresql.org/docs/16/checksums.html).
   Checksums cover data pages, not every internal structure; cluster-level
   configuration is inspected with SHOW data_checksums. We do not disable
   checksums in an existing database or advise ignoring a checksum failure.
5. [pg_checksums, PostgreSQL 16](https://www.postgresql.org/docs/16/app-pgchecksums.html).
   Offline checks require clean shutdown. Disabled checksums do not yield
   successful verification: the utility refuses the check in our off controls.
6. [varlena.c, upstream REL_16_15 commit](https://github.com/postgres/postgres/blob/7d3e000c5961a544302072058a1184e9a588837b/src/backend/utils/adt/varlena.c),
   byteaoctetlen (lines 2964-2970) and bytea_substring (3070 onward).
   Length delegates to toast_raw_datum_size instead of retrieving the full value.
   SHA-256 of fetched file:
   28cddc05bc9cb0be0fd26ca47bad765ec88fe0f65f6031b9d808f090b6ebc070.
7. [detoast.c, same commit](https://github.com/postgres/postgres/blob/7d3e000c5961a544302072058a1184e9a588837b/src/backend/access/common/detoast.c),
   toast_raw_datum_size (545 onward). The on-disk external-pointer path reads
   va_rawsize from the pointer. This explains the size result without treating a
   query-success observation as a trace of every I/O operation.
   SHA-256: 47a45e9396ad4376b1d165ae8a8b1525e7e567d615485799844c9806da73d32d.

The tag was resolved through the official postgres/postgres repository to
7d3e000c5961a544302072058a1184e9a588837b. Upstream source explains the mechanism;
the executed Ubuntu build may contain packaging patches. No upstream build,
patch-equivalence claim, papers, hardware measurements or third-party figures
are represented as reproduced.

## Runtime provenance

- Server package: postgresql-16, 16.15-0ubuntu0.24.04.1, amd64.
- Download: http://archive.ubuntu.com/ubuntu/pool/main/p/postgresql-16/postgresql-16_16.15-0ubuntu0.24.04.1_amd64.deb
- Size: 15,610,426 bytes.
- SHA-256: d60ae76fb862cd4cca7bfdcdcdcc271c5e1d75f6b7915305ce2d962735a4b666.
- Download hash matches the configured APT package metadata.
- Extracted with dpkg-deb, not installed. No host service or configuration changed.
- Server executable SHA-256:
  201d8daff9a5bd9df70b820471b965c39f5a776d677f395232c477d051270722.
- Existing psql and pg_amcheck report the same PostgreSQL/Ubuntu version.
- PostgreSQL source uses the PostgreSQL License. Sources/package are not
  redistributed in this change; only original experiment code and generated data.

## Corpus fit and scope

Searched the current analysis pages and public research assets before selecting
this topic. The checksum article covers coverage boundaries, HDF5, identity and
freshness, but no TOAST/amcheck experiment. The backup article discusses
PostgreSQL backup dependencies, not whether table probes consume external values.

Existing anchors for the eventual publication:
- https://hesela.com/analyses/checksums-identity-and-lost-writes/
- https://hesela.com/analyses/backup-verification-is-not-a-restore-test/
- https://hesela.com/analyses/parquet-checksums-read-coverage/

The experiment adds database-level evidence to those themes instead of
repeating a generic claim that backups should be tested. Publication remains
pending review; this package does not alter either deployed site.
