Limited beta · What is this?

pgTrue is under active development: reports may contain significant mistakes, inaccuracies, or bugs. Please report anything you find to pgtrue@postgres.ai.

pgTrue is an independent fact-check of technical Postgres articles. Read the questions and answers.

pgTrue fact-check

ElephantSeal B+Limited coverageOpen: the production risk is not yet fixed or warned about; central claim not checked

Embed

The ElephantSeal always shows this report's latest edition and links here. Copies cached elsewhere may update later.

[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c)
<a href="https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c"><img src="https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c.svg?v=13&amp;theme=light" alt="pgTrue fact-check" width="90" height="20" loading="lazy" decoding="async" style="display:inline-block;width:90px;height:20px"></a>
https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c)
<a href="https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c"><img src="https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c.svg?v=13&amp;theme=dark" alt="pgTrue fact-check" width="90" height="20" loading="lazy" decoding="async" style="display:inline-block;width:90px;height:20px"></a>
https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c)
<a href="https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c"><img src="https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c.svg?v=13" alt="pgTrue fact-check" width="90" height="20" loading="lazy" decoding="async" style="display:inline-block;width:90px;height:20px"></a>
https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/radar.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c)
<a href="https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c"><img src="https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/radar.svg?v=13&amp;theme=light" alt="pgTrue fact-check" width="240" height="240" loading="lazy" decoding="async" style="display:inline-block;width:240px;height:240px"></a>
https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/radar.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/radar.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/radar.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c)
<a href="https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c"><img src="https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/radar.svg?v=13&amp;theme=dark" alt="pgTrue fact-check" width="240" height="240" loading="lazy" decoding="async" style="display:inline-block;width:240px;height:240px"></a>
https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/radar.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/radar.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/radar.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c)
<a href="https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c"><img src="https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/radar.svg?v=13" alt="pgTrue fact-check" width="240" height="240" loading="lazy" decoding="async" style="display:inline-block;width:240px;height:240px"></a>
https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/radar.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/radar.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/wide.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c)
<a href="https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c"><img src="https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/wide.svg?v=13&amp;theme=light" alt="pgTrue fact-check" width="480" height="240" loading="lazy" decoding="async" style="display:inline-block;width:480px;height:240px"></a>
https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/wide.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/wide.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c
   :alt: pgTrue fact-check
   :width: 480
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/wide.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c)
<a href="https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c"><img src="https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/wide.svg?v=13&amp;theme=dark" alt="pgTrue fact-check" width="480" height="240" loading="lazy" decoding="async" style="display:inline-block;width:480px;height:240px"></a>
https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/wide.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/wide.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c
   :alt: pgTrue fact-check
   :width: 480
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/wide.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c)
<a href="https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c"><img src="https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/wide.svg?v=13" alt="pgTrue fact-check" width="480" height="240" loading="lazy" decoding="async" style="display:inline-block;width:480px;height:240px"></a>
https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/wide.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/ba676115-b32d-46ee-84e8-c21330a8981c/wide.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c
   :alt: pgTrue fact-check
   :width: 480
   :height: 240

Click the snippet to select all of it, then copy. Where SVG is stripped, as in some email clients and feed readers, change .svg to .png. PNG uses the light theme for Auto. For Markdown PNG embeds, use the HTML snippet where supported to preserve the display size.

Optional colours: append &color=26798E or &labelColor=333C47 after a theme query (use ? for the first parameter). Use 3- or 6-digit hex.

For pages with a light background.

For pages with a dark background. The ElephantSeal gets a thin edge so it does not blend in.

Auto follows the reader's light or dark setting where the host supports it, and shows the light ElephantSeal where it does not.

On a light page
On a dark page

The only scalable delete in Postgres is DROP TABLE — PlanetScale (opens in new tab)

planetscale.com
Don't run its recipes as written: 2 can do harm.
0
inaccuracy
2
dangerous-recipe
0
misleading
0
imprecise
0
transcription
0
aged
0
withdrawn
15
verified-accurate

Factual A · Applicable A · Consistent A · Transparent A · Safe D

ReportTechnical fact-check, edition 2 pgTrue versionaudited with v1.1.5 Issued EditionUpdated after review. Corrections are listed below. SubmittedSubmitted by the PostgresAI team. Author responseNo written reply from the author. We re-audited this article 1 time; see Revisions below. Policy: right-of-reply and corrections policy.

Update the cleanup guidance. PostgreSQL 10 partitioning supports the retention strategy, and the buffer-descriptor arithmetic holds. Do not cite atomic renaming as sufficient for replacement-table cutover. Inventory foreign keys before cutover. Drain older snapshots before the TRUNCATE recipe, or use batched DELETE when snapshot consistency must continue.

InaccuraciesNone in this edition.

Dangerous or recipe bugs

F1

Renaming replacement tables leaves foreign keys attached to the original table

INACCURATESafe · holds up after review

Claim ledger

Article says
…mirror writes to a new table, then swap with an atomic rename…
What is true
Foreign keys reference table OIDs in pg_constraint.h:96-97. RenameRelationInternal changes relname in tablecmds.c:4332-4334. Renaming two tables does not transfer those references. Existing foreign keys still target the original table after the name swap.
So what
Inventory incoming foreign keys. Recreate them against the replacement table during cutover, or retain the original table and use batched DELETE.
Charitable reading
The approach can work without incoming foreign keys. The article gives no dependency restriction or transfer step.

Source

Source · REL_18_6 · src/backend/commands/tablecmds.c:4332-4334namestrcpy(&(relform->relname), newrelname); CatalogTupleUpdate(relrelation, &otid, reltup);

Review correction: see "How the review tested this" below.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…mirror writes to a new table, then swap with an atomic rename…
All sources and excerpts · 3
Evidence namestrcpy(&(relform->relname), newrelname); CatalogTupleUpdate(relrelation, &otid, reltup);
Evidence Oid confrelid BKI_LOOKUP_OPT(pg_class); /* relation referenced by * foreign key */
Evidence swaptemp = relform1->relfilenode; relform1->relfilenode = relform2->relfilenode; relform2->relfilenode = swaptemp;
How the review tested this

Review: We tested whether atomic renaming transfers dependencies. Foreign keys retain table OIDs. The article supplies no restriction excluding incoming references. We tested the reading that atomic rename transfers dependencies. Rename changes relname, while foreign keys retain relation OIDs. Tables without incoming foreign keys avoid this defect. The article states no such restriction. Recreating foreign keys is a concrete corrective action.

F3

The cleanup can hide retained rows from older snapshots

INACCURATESafe · holds up after review

Claim ledger

Article says
…TRUNCATE big_table; INSERT INTO big_table SELECT * FROM temp_keep_big_table;…
What is true
TRUNCATE can make the table appear empty to older snapshots after commit. truncate.sgml:147-149 documents this behavior. Transactions that already accessed this table block truncation. Older snapshots from other work can survive the lock. Reinserting retained rows does not make them visible to those snapshots.
So what
Drain transactions holding older snapshots before this maintenance. Use batched DELETE when concurrent snapshot consistency must continue.
Charitable reading
Accepting several minutes of blocked table access does not establish that all older snapshots have ended.

Source

Source · REL_18_6 · doc/src/sgml/ref/truncate.sgml:120-122<command>TRUNCATE</command> cannot be used on a table that has foreign-key references from other tables, unless all such tables are also truncated in the same command. Checking validity in such cases would require table

Review correction: see "How the review tested this" below.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…TRUNCATE big_table; INSERT INTO big_table SELECT * FROM temp_keep_big_table;…
All sources and excerpts · 3
Evidence <command>TRUNCATE</command> cannot be used on a table that has foreign-key references from other tables, unless all such tables are also truncated in the same command. Checking validity in such cases would require table
Evidence <command>TRUNCATE</command> is not MVCC-safe. After truncation, the table will appear empty to concurrent transactions, if they are using a snapshot taken before the truncation occurred.
Evidence snapshot taken before the DDL command committed. This will only be an issue for a transaction that did not access the table in question before the DDL command started &mdash; any transaction that has done so would hold at least an <literal>ACCESS SHARE</literal> table lock, which would block the DDL command until that transaction completes.
How the review tested this

Review: We tested whether the exclusive lock drains every older snapshot. E-17 explicitly preserves the counterexample involving transactions accessing other tables. We tested whether accepting maintenance blocking removes the snapshot risk. ACCESS EXCLUSIVE waits for transactions already accessing this table. Older snapshots established elsewhere can remain. The documented empty-table result supports the consequence and the instruction to drain older snapshots.

Misleading / impreciseNone in this edition.

Verified accurate

F6

PostgreSQL 10 supports LIST, RANGE, and subpartitioning

ACCURATEFactual · holds up after review

Claim ledger

Article says
Partitioning in Postgres is recursive…
What is true
PostgreSQL 10 supports LIST, RANGE, automatic insert routing, and subpartitioning. REL_10_0 ddl.sgml:2901-2915 documents these features. REL_18_6 ddl.sgml:4108-4114 also documents subpartitioning. Whole-partition deletion avoids bulk DELETE vacuum overhead at ddl.sgml:3997-4003.
Charitable reading
The version-10 statement concerns partitioning availability. It does not promise every later partitioning improvement.

Source

Source · REL_18_6 · doc/src/sgml/ddl.sgml:3997-4003Bulk loads and deletes can be accomplished by adding or removing partitions, if the usage pattern is accounted for in the partitioning design. Dropping an individual partition using <command>DROP TABLE</command>, or doing <command>ALTER TABLE DETACH PARTITION</command>, is far faster than a bulk operation. These commands also entirely avoid the <command>VACUUM</command> overhead caused by a bulk <command>DELETE</command>.

Review correction: see "How the review tested this" below.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)Partitioning in Postgres is recursive…
All sources and excerpts · 4
Evidence Bulk loads and deletes can be accomplished by adding or removing partitions, if the usage pattern is accounted for in the partitioning design. Dropping an individual partition using <command>DROP TABLE</command>, or doing <command>ALTER TABLE DETACH PARTITION</command>, is far faster than a bulk operation. These commands also entirely avoid the <command>VACUUM</command> overhead caused by a bulk <command>DELETE</command>.
Evidence All rows inserted into a partitioned table will be routed to one of the <firstterm>partitions</firstterm> based on the value of the partition key. Each partition has a subset of the data defined by its <firstterm>partition bounds</firstterm>. Currently supported partitioning methods include range and list, where each partition is assigned a range of keys and a list of keys, respectively.

Version note: Checked the article's PostgreSQL 10 version floor.

Evidence Partitions may themselves be defined as partitioned tables, using what is called <firstterm>sub-partitioning</firstterm>. Partitions may have their own indexes, constraints and default values, distinct from those of other partitions. Indexes must be created separately for each partition. See <xref linkend="sql-createtable"> for more details on creating partitioned tables and partitions.

Version note: Checked the article's PostgreSQL 10 version floor.

Evidence Partitions may themselves be defined as partitioned tables, resulting in <firstterm>sub-partitioning</firstterm>. Although all partitions must have the same columns as their partitioned parent, partitions may have their own indexes, constraints and default values, distinct from those of other partitions. See <xref linkend="sql-createtable"/> for more details on creating partitioned tables and partitions.
How the review tested this

Review: We checked the PostgreSQL 10 floor instead of assuming current features existed then. RANGE, LIST, routing, and subpartitioning appear there. We checked the PostgreSQL 10 feature floor rather than inferring it from current documentation. REL_10_0 explicitly supports routing, LIST, RANGE, and subpartitioning. The report does not extend that finding to later partitioning features.

F7

DELETE retains row versions for later cleanup

ACCURATEFactual · holds up after review

Claim ledger

Article says
…When rows mutate, Postgres can maintain multiple versions of the same row…
What is true
DELETE records transaction metadata in the heap tuple at heapam.c:3123-3130. It leaves physical cleanup for later. maintenance.sgml:169-174 documents reusable space and the limited tail-page exception for returning space to the operating system.
Charitable reading
The article describes ordinary heap tables and typical vacuum behavior. Its word typically allows tail-page truncation.

Source

Source · REL_18_6 · src/backend/access/heap/heapam.c:3123-3130/* store transaction information of xact deleting the tuple */ tp.t_data->t_infomask &= ~(HEAP_XMAX_BITS | HEAP_MOVED); tp.t_data->t_infomask2 &= ~HEAP_KEYS_UPDATED; tp.t_data->t_infomask |= new_infomask; tp.t_data->t_infomask2 |= new_infomask2; HeapTupleHeaderClearHotUpdated(tp.t_data); HeapTupleHeaderSetXmax(tp.t_data, new_xmax); HeapTupleHeaderSetCmax(tp.t_data, cid, iscombo);

Review correction: see "How the review tested this" below.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…When rows mutate, Postgres can maintain multiple versions of the same row…
All sources and excerpts · 3
Evidence /* store transaction information of xact deleting the tuple */ tp.t_data->t_infomask &= ~(HEAP_XMAX_BITS | HEAP_MOVED); tp.t_data->t_infomask2 &= ~HEAP_KEYS_UPDATED; tp.t_data->t_infomask |= new_infomask; tp.t_data->t_infomask2 |= new_infomask2; HeapTupleHeaderClearHotUpdated(tp.t_data); HeapTupleHeaderSetXmax(tp.t_data, new_xmax); HeapTupleHeaderSetCmax(tp.t_data, cid, iscombo);
Evidence The standard form of <command>VACUUM</command> removes dead row versions in tables and indexes and marks the space available for future reuse. However, it will not return the space to the operating system, except in the special case where one or more pages at the end of a table become entirely free and an exclusive table lock can be easily obtained. In contrast, <command>VACUUM FULL</command> actively compacts
Evidence data consistency is maintained by using a multiversion model (Multiversion Concurrency Control, <acronym>MVCC</acronym>). This means that each SQL statement sees a snapshot of data (a <firstterm>database version</firstterm>) as it was some time ago, regardless of the current state of the underlying data.
How the review tested this

Review: We tested tail-page truncation as a counterexample. The finding explicitly retains that exception and accurately describes DELETE metadata. We checked the tail-page exception as a possible counterexample. The report explicitly preserves it. DELETE's tuple metadata and VACUUM's later reclamation support the retained-version explanation.

F8

Index scans can mark entries dead after checking the heap

ACCURATEFactual · holds up after review

Claim ledger

Article says
…an index scan that finds a dead row can mark the entry as dead itself.
What is true
DELETE defers index-tuple removal to vacuum in nodeModifyTable.c:1807-1809. indexam.c:692-699 requests dead-entry marking after finding an entirely dead HOT chain. Recovery scans skip this optimization.
Charitable reading
The article says can and best-effort. It does not promise that every index scan removes every dead entry.

Source

Source · REL_18_6 · src/backend/executor/nodeModifyTable.c:1808-1809* take care of it later. We can't delete index tuples immediately * anyway, since the tuple is still visible to other transactions.

Review correction: see "How the review tested this" below.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…an index scan that finds a dead row can mark the entry as dead itself.
All sources and excerpts · 2
Evidence * take care of it later. We can't delete index tuples immediately * anyway, since the tuple is still visible to other transactions.
Evidence * If we scanned a whole HOT chain and found only dead tuples, tell index * AM to kill its entry for that TID (this will take effect in the next * amgettuple call, in index_getnext_tid). We do not do this when in * recovery because it may violate MVCC to do so. See comments in * RelationGetIndexScan(). */ if (!scan->xactStartedInRecovery) scan->kill_prior_tuple = all_dead;
How the review tested this

Review: We checked whether dead-entry marking requires more than one invisible tuple. The finding correctly specifies an entirely dead HOT chain. We tested whether the claim promises immediate removal or applies during recovery. The article says marking can occur. The report preserves the all-dead HOT-chain condition and recovery exception shown in indexam.c.

F9

DROP TABLE and TRUNCATE take ACCESS EXCLUSIVE locks

ACCURATEFactual · holds up after review

Claim ledger

Article says
…DROP TABLE and TRUNCATE require a heavyweight AccessExclusiveLock…
What is true
RemoveRelations initializes AccessExclusiveLock at tablecmds.c:1553. truncate.sgml:111-114 documents the same lock for TRUNCATE. The lock blocks concurrent operations on each affected table.
Charitable reading
The article identifies a table lock. Its later acceptance of maintenance blocking is an explicit operating assumption.

Source

Source · REL_18_6 · src/backend/commands/tablecmds.c:1553-1553LOCKMODE lockmode = AccessExclusiveLock;

Review correction: see "How the review tested this" below.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…DROP TABLE and TRUNCATE require a heavyweight AccessExclusiveLock…
All sources and excerpts · 2
Evidence LOCKMODE lockmode = AccessExclusiveLock;
Evidence <command>TRUNCATE</command> acquires an <literal>ACCESS EXCLUSIVE</literal> lock on each table it operates on, which blocks all other concurrent operations on the table. When <literal>RESTART IDENTITY</literal> is specified, any sequences that are to be restarted are likewise locked exclusively.
How the review tested this

Review: We checked DROP and TRUNCATE separately. Both support ACCESS EXCLUSIVE locking without asserting a database-wide lock. We checked DROP's lock initialization and TRUNCATE's documented lock. Both support ACCESS EXCLUSIVE. The report confines blocking to affected tables rather than claiming a database-wide lock.

F10

CREATE TEMP TABLE AS copies the selected retained rows

ACCURATEFactual · holds up after review

Claim ledger

Article says
…CREATE TEMP TABLE temp_keep_big_table AS SELECT * FROM big_table WHERE updated_at >= '2026-04-01'…
What is true
CREATE TABLE AS copies SELECT output once. create_table_as.sgml:39-44 documents the resulting column names and types. The displayed cutoff keeps rows whose compatible updated_at value meets the comparison. This checks statement structure and semantics, not the unknown table schema.
Charitable reading
The example assumes big_table exists and updated_at supports comparison with the date literal.

Source

Source · REL_18_6 · doc/src/sgml/ref/create_table_as.sgml:39-44<command>CREATE TABLE AS</command> creates a table and fills it with data computed by a <command>SELECT</command> command. The table columns have the names and data types associated with the output columns of the <command>SELECT</command> (except that you can override the column names by giving an explicit list of new column names).

Review correction: see "How the review tested this" below.

In the article · section “A performant one-off delete”

In the article

excerpt · section “A performant one-off delete” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

A performant one-off delete

CREATE TEMP TABLE temp_keep_big_table AS SELECT * FROM big_table WHERE updated_at >= '2026-04-01' ;
All sources and excerpts · 1
Evidence <command>CREATE TABLE AS</command> creates a table and fills it with data computed by a <command>SELECT</command> command. The table columns have the names and data types associated with the output columns of the <command>SELECT</command> (except that you can override the column names by giving an explicit list of new column names).
How the review tested this

Review: We tested whether the finding certifies unknown schema dependencies. It expressly limits verification to statement structure and compatible column types. We tested whether the finding certifies the complete recipe or an unknown schema. It explicitly excludes both. CREATE TABLE AS documentation supports copying the SELECT output under the stated type assumptions.

F11

pg_squeeze reclaims unused table space through an online rewrite

ACCURATEFactual · holds up after review

Claim ledger

Article says
pg_squeeze is for optimizing tables that already have significant bloat.
What is true
pg_squeeze README.md:1-4 describes concurrent space reclamation. Lines 17-18 specify logical decoding for concurrent changes. pg_squeeze.c:3193-3195 swaps physical storage identifiers. The article's broad online-rewrite analogy holds, but these mechanisms differ from trigger capture and table-name swaps.
Charitable reading
The article calls the analogy roughly equivalent. We do not treat that qualification as an exact implementation claim.

Source

Source · pg_squeeze@REL1_9_4 · README.md:1-4PostgreSQL extension that removes unused space from a table and optionally sorts tuples according to particular index (as if [CLUSTER][2] command was executed concurrently with regular reads / writes). In fact we try to replace [`pg_repack`][1] extension.

Review correction: see "How the review tested this" below.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)pg_squeeze is for optimizing tables that already have significant bloat.
All sources and excerpts · 5
EvidencePostgreSQL extension that removes unused space from a table and optionally sorts tuples according to particular index (as if [CLUSTER][2] command was executed concurrently with regular reads / writes). In fact we try to replace [`pg_repack`][1] extension.
Evidencethat we use [logical decoding][4] instead of triggers to capture concurrent changes.
Evidence swaptemp = relform1->relfilenode; relform1->relfilenode = relform2->relfilenode; relform2->relfilenode = swaptemp;
EvidencePostgreSQL extension that removes unused space from a table and optionally sorts tuples according to particular index (as if [CLUSTER][2] command was executed concurrently with regular reads / writes). In fact we try to replace [`pg_repack`][1] extension.
EvidenceAs for (2), one important difference (besides the use of background workers) is that we use [logical decoding][4] instead of triggers to capture concurrent changes.
How the review tested this

Review: We tested the trigger and rename analogy against implementation. The finding preserves the broad analogy while naming both mechanism differences. We tested the analogy against pg_squeeze's actual capture and cutover mechanisms. Logical decoding and storage-identifier swapping differ from triggers and renaming. The report states those differences while validating only the broad online-rewrite analogy.

F12

PostgreSQL 10 supports the described partitioning methods

ACCURATEFactual · holds up after review

Claim ledger

Article says
…Since version 10, Postgres has had great partitioning support.
What is true
PostgreSQL 10 supports declarative RANGE and LIST partitioning. REL_10_0 doc/src/sgml/release-10.sgml:1595 confirms both methods. doc/src/sgml/ddl.sgml:3104 documents subpartitioning.
Charitable reading
The sentence identifies the availability of declarative partitioning. Its description of quality is subjective.

Source

Source · REL_10_0 · doc/src/sgml/release-10.sgml:1595-1595The syntax supports range and list partitioning.

Review correction: see "How the review tested this" below.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…Since version 10, Postgres has had great partitioning support.
All sources and excerpts · 2
Evidence The syntax supports range and list partitioning.

Version note: Checked the article's PostgreSQL 10 version floor.

Evidence To implement sub-partitioning, specify the <literal>PARTITION BY</literal> clause in the commands used to create individual partitions, for example:

Version note: Checked the article's PostgreSQL 10 version floor.

How the review tested this

Review: We checked the historical release and subpartition syntax. Both support the finding, although F6 covers substantially the same claim. We checked release-10.sgml and the PostgreSQL 10 subpartitioning instructions. Both support the feature claim. The report correctly avoids treating the article's quality adjective as a measurable guarantee.

F13

DELETE does not immediately reclaim deleted row storage

ACCURATEFactual · holds up after review

Claim ledger

Article says
…big batch DELETE operations don't immediately free up physical disk space…
What is true
DELETE retains old row versions until cleanup can reclaim them. REL_18_6 doc/src/sgml/maintenance.sgml:157 states that DELETE does not immediately remove the old row version.
Charitable reading
The claim concerns ordinary DELETE execution, before subsequent cleanup or table rewriting.

Source

Source · REL_18_6 · doc/src/sgml/maintenance.sgml:157-158<command>UPDATE</command> or <command>DELETE</command> of a row does not immediately remove the old version of the row.

Review correction: see "How the review tested this" below.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…big batch DELETE operations don't immediately free up physical disk space…
All sources and excerpts · 1
Evidence <command>UPDATE</command> or <command>DELETE</command> of a row does not immediately remove the old version of the row.
How the review tested this

Review: We distinguished immediate DELETE effects from later vacuum cleanup. E-55 directly supports the narrower claim. We tested whether later cleanup contradicts the immediate-storage claim. maintenance.sgml explicitly says DELETE does not immediately remove old row versions. The finding does not extend this evidence to replication overhead.

F14

VACUUM FULL rewrites the table under ACCESS EXCLUSIVE

ACCURATEFactual · holds up after review

Claim ledger

Article says
VACUUM FULL allows for this, but takes an expensive lock for a long time.
What is true
VACUUM FULL compacts the table through a file rewrite. REL_18_6 doc/src/sgml/maintenance.sgml:131 documents ACCESS EXCLUSIVE locking. The rewrite can take substantial time.
Charitable reading
The article describes VACUUM FULL on a substantial table. It does not promise a fixed lock duration.

Source

Source · REL_18_6 · doc/src/sgml/maintenance.sgml:131-134<command>VACUUM FULL</command> requires an <literal>ACCESS EXCLUSIVE</literal> lock on the table it is working on, and therefore cannot be done in parallel with other use of the table. Generally, therefore,

Review correction: see "How the review tested this" below.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)VACUUM FULL allows for this, but takes an expensive lock for a long time.
All sources and excerpts · 2
Evidence <command>VACUUM FULL</command> requires an <literal>ACCESS EXCLUSIVE</literal> lock on the table it is working on, and therefore cannot be done in parallel with other use of the table. Generally, therefore,
Evidence easily obtained. In contrast, <command>VACUUM FULL</command> actively compacts tables by writing a complete new version of the table file with no dead space. This minimizes the size of the table, but can take a long time.
How the review tested this

Review: We tested whether a small table defeats the duration claim. The finding says the rewrite can take substantial time. We tested whether the report asserts a guaranteed long duration. It says the rewrite can take substantial time. The cited documentation supports both the file rewrite and ACCESS EXCLUSIVE lock.

F15

One parent-row deletion can cascade to many child rows

ACCURATEFactual · holds up after review

Claim ledger

Article says
…using foreign keys and CASCADE for deletions can cause a single row delete to delete gigabytes of data…
What is true
ON DELETE CASCADE automatically deletes referencing rows. REL_18_6 doc/src/sgml/ddl.sgml:1294 documents that behavior. A large collection of referencing rows can occupy gigabytes.
Charitable reading
The article says a cascade can delete gigabytes. It does not claim every cascade deletes that amount.

Source

Source · REL_18_6 · doc/src/sgml/ddl.sgml:1294-1295<literal>CASCADE</literal> specifies that when a referenced row is deleted, row(s) referencing it should be automatically deleted as well.

Review correction: see "How the review tested this" below.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…using foreign keys and CASCADE for deletions can cause a single row delete to delete gigabytes of data…
All sources and excerpts · 1
Evidence <literal>CASCADE</literal> specifies that when a referenced row is deleted, row(s) referencing it should be automatically deleted as well.
How the review tested this

Review: We checked whether the finding treats gigabytes as guaranteed. It correctly makes deleted volume depend on referencing rows. We tested whether the gigabyte statement requires a measured example. Both article and report describe a possibility. CASCADE deletes referencing rows, whose aggregate size has no stated gigabyte restriction.

F16

Partition removal avoids deleting each expired row

ACCURATEFactual · holds up after review

Claim ledger

Article says
…a workload that does "lots of DELETE " into a workload that does "occasional DROP TABLE ."…
What is true
Dropping an expired partition avoids individual row deletion. REL_18_6 doc/src/sgml/ddl.sgml:4324 documents this advantage and the parent-table lock. TRUNCATE also avoids scanning table rows.
Charitable reading
The claim applies when the retention predicate matches complete partitions.

Source

Source · REL_18_6 · doc/src/sgml/ddl.sgml:4324-4327This can very quickly delete millions of records because it doesn't have to individually delete every record. Note however that the above command requires taking an <literal>ACCESS EXCLUSIVE</literal> lock on the parent table.

Review correction: see "How the review tested this" below.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…a workload that does "lots of DELETE " into a workload that does "occasional DROP TABLE ."…
All sources and excerpts · 2
Evidence This can very quickly delete millions of records because it doesn't have to individually delete every record. Note however that the above command requires taking an <literal>ACCESS EXCLUSIVE</literal> lock on the parent table.
Evidence <command>TRUNCATE</command> quickly removes all rows from a set of tables. It has the same effect as an unqualified <command>DELETE</command> on each table, but since it does not actually scan the tables it is faster. Furthermore, it reclaims disk space immediately, rather than requiring a subsequent <command>VACUUM</command> operation. This is most useful on large tables.
How the review tested this

Review: We tested retention predicates that cut across partitions. The finding restricts its claim to expired partitions and includes parent locking. We tested the strategy against predicates that cut through partitions. The report limits its approval to whole-partition expiration. Documentation supports avoiding individual deletions and identifies the parent-table lock.

F17

ACCESS EXCLUSIVE blocks concurrent table access

ACCURATEFactual · holds up after review

Claim ledger

Article says
…this prevents other transactions from reading or writing the table…
What is true
ACCESS EXCLUSIVE blocks other concurrent operations on the table. REL_18_6 doc/src/sgml/ref/truncate.sgml:111 documents the same lock and its blocking behavior.
Charitable reading
The claim concerns concurrent access to the locked table during the cleanup transaction.

Source

Source · REL_18_6 · doc/src/sgml/ref/truncate.sgml:111-113<command>TRUNCATE</command> acquires an <literal>ACCESS EXCLUSIVE</literal> lock on each table it operates on, which blocks all other concurrent operations on the table. When <literal>RESTART IDENTITY</literal> is specified, any

Review correction: see "How the review tested this" below.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…this prevents other transactions from reading or writing the table…
All sources and excerpts · 1
Evidence <command>TRUNCATE</command> acquires an <literal>ACCESS EXCLUSIVE</literal> lock on each table it operates on, which blocks all other concurrent operations on the table. When <literal>RESTART IDENTITY</literal> is specified, any
How the review tested this

Review: We checked lock scope and duration. The finding concerns concurrent access to the affected table during the transaction. We tested whether the lock claim certifies snapshot safety or the full cleanup transaction. The finding certifies only concurrent table-access blocking. truncate.sgml directly supports that narrower statement.

F18

Read Committed queries can observe different snapshots

ACCURATEFactual · holds up after review

Claim ledger

Article says
…different transactions can see row values as of the time they were queried…
What is true
Read Committed SELECT queries observe committed data from their query-start snapshots. REL_18_6 doc/src/sgml/mvcc.sgml:324 documents this behavior.
Charitable reading
The sentence says transactions can observe query-time snapshots. It does not assign that behavior to every isolation level.

Source

Source · REL_18_6 · doc/src/sgml/mvcc.sgml:324-326execution. In effect, a <command>SELECT</command> query sees a snapshot of the database as of the instant the query begins to run. However, <command>SELECT</command> does see the effects

Review correction: see "How the review tested this" below.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…different transactions can see row values as of the time they were queried…
All sources and excerpts · 1
Evidence execution. In effect, a <command>SELECT</command> query sees a snapshot of the database as of the instant the query begins to run. However, <command>SELECT</command> does see the effects
How the review tested this

Review: We tested Repeatable Read as a counterexample. The finding explicitly limits its explanation to Read Committed SELECT queries. We tested Repeatable Read as a counterexample to a universal snapshot claim. The article says transactions can observe query-time values. The report specifically identifies Read Committed, which the cited text supports.

F19

64-byte shared buffer descriptors match the default 8 KiB page calculation

ACCURATEFactual · holds up after review

Claim ledger

Article says
…(a BufferDesc , padded to 64 bytes) for every 8KB buffer…
What is true
PostgreSQL pads shared buffer descriptors to 64 bytes on ordinary 64-bit builds. configure.ac:253 defaults pages to 8,192 bytes. src/backend/storage/buffer/buf_init.c:78 allocates one padded descriptor per buffer.
Charitable reading
The article describes the ordinary 64-bit build with the default block size.

Source

Source · REL_18_6 · src/include/storage/buf_internals.h:293-293#define BUFFERDESC_PAD_TO_SIZE (SIZEOF_VOID_P == 8 ? 64 : 1)

Review correction: see "How the review tested this" below.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…(a BufferDesc , padded to 64 bytes) for every 8KB buffer…
All sources and excerpts · 4
Evidence#define BUFFERDESC_PAD_TO_SIZE (SIZEOF_VOID_P == 8 ? 64 : 1)
EvidencePGAC_ARG_REQ(with, blocksize, [BLOCKSIZE], [set table block size in kB [8]], [blocksize=$withval], [blocksize=8]) case ${blocksize} in 1) BLCKSZ=1024;; 2) BLCKSZ=2048;; 4) BLCKSZ=4096;; 8) BLCKSZ=8192;;
Evidence NBuffers * sizeof(BufferDescPadded),
Evidence NBuffers * (Size) BLCKSZ + PG_IO_ALIGN_SIZE,
How the review tested this

Review: We checked pointer-size padding and configurable block sizes. The finding states the ordinary 64-bit build and default-page assumptions. We checked custom block sizes and pointer-width exceptions. The report explicitly assumes ordinary 64-bit builds and default pages. The padding macro and allocation expressions support one 64-byte descriptor per 8,192-byte buffer.

F20

128 GiB of default buffers has approximately 1 GiB of descriptors

ACCURATEFactual · holds up after review

Claim ledger

Article says
…with 128GB of shared buffers, you are sweeping only ~1GB of memory, sequentially…
What is true
Descriptors occupy 1/128 of buffer storage (derived: 64 bytes / 8,192 bytes). A 128 GiB pool has approximately 1 GiB of descriptors. src/backend/storage/buffer/bufmgr.c:4791 walks descriptors sequentially in its full-scan branch. An optimization can avoid that scan.
Charitable reading
The example estimates descriptor memory for the full-scan branch, using PostgreSQL’s conventional binary memory units.

Source

Source · REL_18_6 · src/include/storage/buf_internals.h:293-293#define BUFFERDESC_PAD_TO_SIZE (SIZEOF_VOID_P == 8 ? 64 : 1)

Review correction: see "How the review tested this" below.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…with 128GB of shared buffers, you are sweeping only ~1GB of memory, sequentially…
All sources and excerpts · 6
Evidence#define BUFFERDESC_PAD_TO_SIZE (SIZEOF_VOID_P == 8 ? 64 : 1)
EvidencePGAC_ARG_REQ(with, blocksize, [BLOCKSIZE], [set table block size in kB [8]], [blocksize=$withval], [blocksize=8]) case ${blocksize} in 1) BLCKSZ=1024;; 2) BLCKSZ=2048;; 4) BLCKSZ=4096;; 8) BLCKSZ=8192;;
Evidence NBuffers * sizeof(BufferDescPadded),
Evidence NBuffers * (Size) BLCKSZ + PG_IO_ALIGN_SIZE,
Evidence for (i = 0; i < NBuffers; i++) { RelFileLocator *rlocator = NULL; BufferDesc *bufHdr = GetBufferDescriptor(i); uint32 buf_state;
Evidence /* * We can avoid scanning the entire buffer pool if we know the exact size * of each of the given relation forks. See DropRelationBuffers. */
How the review tested this

Review: We recomputed 64/8192 and checked the scan bypass. The calculation holds, and the finding makes no elapsed-time guarantee. We recomputed the descriptor ratio and checked the scan optimization. A 128 GiB buffer pool has 1 GiB of descriptors (derived: 128 GiB × 64 / 8,192). The report excludes elapsed-time validation and acknowledges that some drops avoid the full scan.

Notes

2 not graded: findings no reader would act on differently
F4

The cleanup writes WAL beyond retained heap rows

NOTEholds up after review

Claim ledger

Article says
…the only data written to the Write Ahead Log (WAL) are the reinserted rows in the big_table…
What is true
TRUNCATE and index maintenance also write WAL. tablecmds.c:2331-2337 emits the truncation record for logical decoding. nodeModifyTable.c:1238-1243 inserts index entries. nbtinsert.c:1389 writes their WAL records. The retained-row strategy still avoids logging row-by-row deletions.
Charitable reading
The claim correctly describes the dominant retained-row payload. It overstates that reduction with the word only.

Source

Source · REL_18_6 · src/backend/commands/tablecmds.c:2331-2337XLogBeginInsert(); XLogRegisterData(&xlrec, SizeOfHeapTruncate); XLogRegisterData(logrelids, list_length(relids_logged) * sizeof(Oid)); XLogSetRecordFlags(XLOG_INCLUDE_ORIGIN); (void) XLogInsert(RM_HEAP_ID, XLOG_HEAP_TRUNCATE);

Not graded: no reader would act differently on it.

Review correction: see "How the review tested this" below.

In the article · section “A performant one-off delete”

In the article

excerpt · section “A performant one-off delete” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

A performant one-off delete

This worked very well for a one-off; the only data written to the Write Ahead Log (WAL) are the reinserted rows in the big_table .

All sources and excerpts · 3
Evidence XLogBeginInsert(); XLogRegisterData(&xlrec, SizeOfHeapTruncate); XLogRegisterData(logrelids, list_length(relids_logged) * sizeof(Oid)); XLogSetRecordFlags(XLOG_INCLUDE_ORIGIN); (void) XLogInsert(RM_HEAP_ID, XLOG_HEAP_TRUNCATE);
Evidence /* insert index entries for tuple */ if (resultRelInfo->ri_NumIndices > 0) recheckIndexes = ExecInsertIndexTuples(resultRelInfo, slot, estate, false, false, NULL, NIL, false);
Evidence recptr = XLogInsert(RM_BTREE_ID, xlinfo);
How the review tested this

Review: We checked WAL conditions and the charitable payload interpretation. The finding identifies logical decoding and treats this distinction as an ungraded note. We read retained rows as the dominant payload rather than a complete WAL inventory. Index insertion and truncation logging support the narrower correction. The existing note severity preserves that charitable reading and makes no WAL-volume claim.

F5

Visibility maps mark pages without dead tuples

NOTEholds up after review

Claim ledger

Article says
…visibility maps to skip over "dead tuples."…
What is true
Visibility maps identify all-visible pages, rather than dead tuples to skip. storage.sgml:658-663 describes these page flags. DELETE clears visibility-map bits in heapam.c:3113-3120. Tuple visibility checks use transaction and snapshot information.
Charitable reading
Visibility maps help vacuum skip pages and index-only scans avoid heap access. They do not mark individual dead rows.

Source

Source · REL_18_6 · doc/src/sgml/storage.sgml:658-663The visibility map stores two bits per heap page. The first bit, if set, indicates that the page is all-visible, or in other words that the page does not contain any tuples that need to be vacuumed. This information can also be used by <link linkend="indexes-index-only-scans"><firstterm>index-only scans</firstterm></link> to answer queries using only the index tuple.

Not graded: no reader would act differently on it.

Review correction: see "How the review tested this" below.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…visibility maps to skip over "dead tuples."…
All sources and excerpts · 3
EvidenceThe visibility map stores two bits per heap page. The first bit, if set, indicates that the page is all-visible, or in other words that the page does not contain any tuples that need to be vacuumed. This information can also be used by <link linkend="indexes-index-only-scans"><firstterm>index-only scans</firstterm></link> to answer queries using only the index tuple.
Evidence if (clear_all_visible) { /* It's possible the VM bits were already clear */ if (visibilitymap_clear_locked(relation, BufferGetBlockNumber(buffer), vmbuffer, VISIBILITYMAP_VALID_BITS)) vmbuffer_modified = true; PageClearAllVisible(page);
Evidence /* store transaction information of xact deleting the tuple */ tp.t_data->t_infomask &= ~(HEAP_XMAX_BITS | HEAP_MOVED); tp.t_data->t_infomask2 &= ~HEAP_KEYS_UPDATED; tp.t_data->t_infomask |= new_infomask; tp.t_data->t_infomask2 |= new_infomask2; HeapTupleHeaderClearHotUpdated(tp.t_data); HeapTupleHeaderSetXmax(tp.t_data, new_xmax); HeapTupleHeaderSetCmax(tp.t_data, cid, iscombo);
How the review tested this

Review: We considered visibility maps as a broad scanning optimization. Page flags still do not identify individual dead tuples. Note severity fits. We tested whether page-skipping behavior validates the article's wording. Visibility maps identify all-visible pages, not individual dead tuples. DELETE clears those page flags. The report appropriately limits this correction to a note.

More in this report

Section checks · 6 sections

Section checks

AspectGradeFindingsCoverageWhy
Deletion strategyA1 verified-accurate66% of claims (4 of 6, plus 1 that need data we do not have)Dropping expired partitions avoids deleting each row when retention boundaries match partition boundaries.
Deletes hurtA6 verified-accurate100% of claims (14 of 14, plus 3 that need data we do not have)DELETE retains row versions, but visibility maps describe pages rather than individual dead tuples.
Whole-table deletionA3 verified-accurate73% of claims (11 of 15, plus 1 that need data we do not have)ACCESS EXCLUSIVE locking and the 64-byte descriptor calculation hold. The calculation does not establish execution time.
One-off cleanupD1 dangerous-recipe · 2 verified-accurate100% of claims (12 of 12, plus 1 that need data we do not have)ACCESS EXCLUSIVE blocks table access, but TRUNCATE can hide retained rows from older snapshots.
Online cleanup and batchesD1 dangerous-recipe · 1 verified-accurate100% of claims (5 of 5, plus 4 that need data we do not have)Renaming tables preserves foreign-key targets. pg_squeeze uses logical decoding and swaps physical storage identifiers.
Partition-based retentionA2 verified-accurate100% of claims (11 of 11)PostgreSQL 10 supports the described RANGE, LIST, and recursive partitioning methods.
Coverage and assessment · Checked 57 of 63 Postgres claims across 7 sections

B+ — the findings address the article's main subject. What we did not check is listed below. We checked partition removal, DELETE cleanup, table locks, buffer descriptors, and the copy-and-truncate recipe against PostgreSQL source and documentation.

We did not check everything in this article. What we did not check is listed below, in the words we recorded at the time. None of it moved the letter. We never charge our own limits to the article.

What we did not check

  • We did not execute the cleanup recipe or verify its table schema, privileges, triggers, or runtime behavior.
  • We did not reproduce the cleanup duration or measure the 128 GB buffer-cache sweep.
  • We did not reproduce the article's cleanup timings or measure its scalability claims.
  • We did not check the buffer-cache sweep, WAL accounting, or replication-lag claims.
  • We did not validate the cleanup recipes against table dependencies, permissions, generated columns, identities, or triggers.
  • We did not verify the article's claim that batching avoids lock pileups or lets autovacuum keep up.
  • We did not establish a release-by-release history for pg_squeeze or pg_partman.
  • We did not reproduce the cleanup example’s reported runtime or verify its row counts.
  • We did not measure DROP TABLE execution time with 128 GiB of shared buffers.
  • We could not compare the cleanup recipe’s input and restored rows because the article provides no sample output.
  • We did not check the cleanup recipe’s dependencies, permissions, schema compatibility, or runtime effects.
  • We did not finish checking the evidence for the central claim.
  • Factual: we did not complete every applicable check.
  • Applicable: we did not complete every applicable check.
  • Consistent: we did not complete every applicable check.
  • Transparent: we did not complete every applicable check.
  • Safe: we did not complete every applicable check.
  • Transparent: we did not finish checking whether the claims cite sources.
  • Transparent: we did not finish checking whether the claims are dated.
  • Transparent: we did not finish checking whether the article discloses the author's interest.
  • Transparent: we did not finish checking whether the article names its author and date.
  • We could not confirm whether finding F1 fails loudly.
  • We could not confirm whether finding F3 fails loudly.
  • We did not finish checking the article's experiments.
  • We did not finish checking the steps the article gives for production.

Script checks

  • No code blocks were checked for syntax.
  • 1 block was not checked for syntax.
  • Code block 1 was not checked for syntax because the language is not supported or not declared.
  • We did not execute any scripts or check dependencies, setup, permissions, embedded SQL, function bodies, inline snippets, or run-time effects.
Checked 57 of 63 Postgres claims across 7 sections
  • Deletion strategy: 4 of 6 Postgres claims checked, plus 1 that need data we do not have; not counted: 2 product or opinion, 2 not a claim; not checked: 2 for other reasons
  • Deletes hurt: 14 of 14 Postgres claims checked, plus 3 that need data we do not have; not counted: 3 product or opinion, 3 duplicate, 2 not a claim
  • Whole-table deletion: 11 of 15 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 product or opinion, 1 not a claim; not checked: 4 for other reasons
  • One-off cleanup: 12 of 12 Postgres claims checked, plus 1 that need data we do not have; not counted: 5 product or opinion, 1 duplicate, 3 not a claim
  • Online cleanup and batches: 5 of 5 Postgres claims checked, plus 4 that need data we do not have; not counted: 1 product or opinion, 1 not a claim
  • Partition-based retention: 11 of 11 Postgres claims checked; not counted: 2 product or opinion, 2 not a claim
  • Conclusion: 2 claims are the author's own account; nothing checkable; not counted: 1 product or opinion, 1 duplicate, 1 not a claim

Average of 5 axes: 3.4 · result B+

Dropping expired partitions avoids individual row deletion and its vacuum overhead. PostgreSQL 10 supports the described partitioning methods. DELETE retains row versions for later cleanup. The 64-byte buffer-descriptor calculation also holds.

The cleanup advice omits prerequisites that affect correctness. Atomic table renames preserve existing foreign-key targets. TRUNCATE can hide retained rows from older snapshots despite the exclusive lock. The WAL and visibility-map explanations also overstate their mechanisms.

Some explanatory text is not shown in this edition; the grade and findings are complete.

Scorecard · the five axes
FACTS scorecard Scorecard radar, 5 axes, bigger is better. Overall B+. Factual A · 0 wrong of 17 checked · 0 caveats. Applicable A · 0 checked. Consistent A · 0 checked. Transparent A · 0 wrong of 10 checked · 0 caveats · transparency: no answered defects. Safe D · 2 wrong of 2 checked · 0 caveats. A 0 wrong of 17 checked · 0 caveatsFactual A0 wrong of 170 caveats A 0 checkedApplicable A0 checked A 0 checkedConsistent A0 checked A 0 wrong of 10 checked · 0 caveats transparency: no answered defectsTransparent A0 wrong of 100 caveatstransparency: noanswered defects D 2 wrong of 2 checked · 0 caveatsSafe D2 wrong of 20 caveats B+

By topic: Deletion strategy — 1 finding, 0 wrong · Deletes hurt — 6 findings, 0 wrong · Whole-table deletion — 3 findings, 0 wrong · One-off cleanup — 3 findings, 1 wrong · Online cleanup and batches — 2 findings, 1 wrong · Partition-based retention — 2 findings, 0 wrong

Further out is better. Each axis has its own letter, from the wrong claims and caveats among the claims we checked of that kind.

Checked on the FACTS: Factual, Applicable, Consistent, Transparent, Safe. Clockwise: Factual (is it true?), Applicable (does it apply to my setup, today?), Consistent (does it agree with itself?), Transparent (can I check it myself?), Safe (can I run this on prod?).

We checked 17 claims, 1 command scanned.

AxisLetterWrongCaveatsCheckedCoverage
FactualA0017partly assessed: A · 0 wrong of 17 checked · 0 caveats · partly assessed
ApplicableA000partly assessed
ConsistentA000A · 0 checked
TransparentA0010partly assessed: A · 0 wrong of 10 checked · 0 caveats · transparency: no answered defects · partly assessed
SafeD202partly assessed: D · 2 wrong of 2 checked · 0 caveats · partly assessed
Topics · 6 topics

Topics

TopicFactualApplicableConsistentTransparentSafe
Deletion strategy0 issues 1 checked F160 issues 1 checked
Deletes hurt0 issues 6 checked F7 F8 F13 F14 F15 F180 issues 2 checked0 issues 4 checked
Whole-table deletion0 issues 3 checked F9 F19 F200 issues 2 checked
One-off cleanup0 issues 3 checked F10 F170 issues 3 checked1 issue 1 checked F3
Online cleanup and batches0 issues 2 checked F111 issue 1 checked F1
Partition-based retention0 issues 2 checked F6 F120 issues 2 checked0 issues 2 checked

Issues found among the claims checked, per topic and axis. Each link goes to the finding behind the count.

Revisions: 2 · D+ -> B+

We audited this article 2 times. Each row is the final edition of one audit. Letters and findings of earlier revisions stay readable at their own address.

  1. Revision 1 · 2026-10-31 14:30 UTC · D+ · audited with v1.1.4

    Article as first submitted. 16 accurate · 2 wrong · 0 caveats.

    ElephantSeal: D+. Open: the benchmark cannot yet be rerun from what is published; the production risk is not yet fixed or warned about; central claim not checked.

    Changes: First audit. Open: F1 “A name swap leaves foreign keys attached to the original table” (dangerous); F2 “Dropping a retention partition also locks its parent” (misleading).

  2. Revision 2 · this page · 2026-11-03 02:12 UTC · B+ · audited with v1.1.5

    Same article text, re-audited. 15 accurate · 2 wrong · 0 caveats.

    ElephantSeal: B+. Open: the production risk is not yet fixed or warned about; central claim not checked.

    Changes: No longer reported: “A name swap leaves foreign keys attached to the original table”; “Dropping a retention partition also locks its parent”. New: F1 “Renaming replacement tables leaves foreign keys attached to the original table” (dangerous); F3 “The cleanup can hide retained rows from older snapshots” (dangerous).

Questions and answers

Questions and answers

What is pgTrue?

pgTrue is an independent fact-check of technical Postgres articles, made by PostgresAI. It helps you check advice before you use it.

What does the letter grade mean?

The letter grade summarizes the claims we checked. Five axes show what we checked:

  • Factual: is it true?
  • Applicable: does it apply to my setup, today?
  • Consistent: does it agree with itself?
  • Transparent: can I check it myself?
  • Safe: can I run this in production?

What is the ElephantSeal?

The ElephantSeal is the mark an article earns. It always shows the latest edition. “Open:” lists what is still open.

Can an author reply?

Authors can ask us to correct a finding, reply to it, or withdraw it. Right-of-reply policy.

Paste into your AI assistant to fix the article, then ask for a re-review.

Show the text
Fix the article with this report, then ask pgTrue for a re-review.

# pgTrue report: The only scalable delete in Postgres is DROP TABLE — PlanetScale

Article title: The only scalable delete in Postgres is DROP TABLE — PlanetScale
Article URL: https://planetscale.com/blog/the-only-scalable-delete
Report URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c
Audited revision: 2 of 2, 2026-11-03 02:12:13 UTC
Overall letter: B+

## Axes

- Factual: A · 0 wrong · 17 checked · 0 caveats · partly assessed
- Applicable: A · 0 wrong · 0 checked · 0 caveats · partly assessed
- Consistent: A · 0 wrong · 0 checked · 0 caveats · A · 0 checked
- Transparent: A · 0 wrong · 10 checked · 0 caveats · partly assessed
- Safe: D · 2 wrong · 2 checked · 0 caveats · partly assessed

ElephantSeal: B+.
Open conditions: the production risk is not yet fixed or warned about; central claim not checked.

## Report metadata

- Report: Technical fact-check, edition 2
- pgTrue version: audited with v1.1.5
- Issued: 2026-11-03
- Edition: Updated after review. Corrections are listed below.
- Submitted: Submitted by the PostgresAI team.
- Author response: No written reply from the author. We re-audited this article 1 time; see Revisions below. Policy: [right-of-reply and corrections policy](/pgtrue/security).

## Findings needing a change (2)

### F1 · Inaccurate · Safe · Renaming replacement tables leaves foreign keys attached to the original table
Location: Article · exact quote · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=mirror%20writes%20to%20a%20new,swap%20with%20an%20atomic%20rename)
Article says:
```text
…mirror writes to a new table, then swap with an atomic rename…
```
What is true:
Foreign keys reference table OIDs in pg_constraint.h:96-97. RenameRelationInternal changes relname in tablecmds.c:4332-4334. Renaming two tables does not transfer those references. Existing foreign keys still target the original table after the name swap.
So what:
Inventory incoming foreign keys. Recreate them against the replacement table during cutover, or retain the original table and use batched DELETE.
Charitable reading:
The approach can work without incoming foreign keys. The article gives no dependency restriction or transfer step.
Review: We tested whether atomic renaming transfers dependencies. Foreign keys retain table OIDs. The article supplies no restriction excluding incoming references. We tested the reading that atomic rename transfers dependencies. Rename changes relname, while foreign keys retain relation OIDs. Tables without incoming foreign keys avoid this defect. The article states no such restriction. Recreating foreign keys is a concrete corrective action.

Sources:
- [REL_18_6 · src/backend/commands/tablecmds.c:4332-4334](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/tablecmds.c#L4332-L4334)
  Excerpt:
  ```text
  namestrcpy(&(relform->relname), newrelname);

	CatalogTupleUpdate(relrelation, &otid, reltup);
  ```
- [REL_18_6 · src/include/catalog/pg_constraint.h:96-97](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/catalog/pg_constraint.h#L96-L97)
  Excerpt:
  ```text
  Oid			confrelid BKI_LOOKUP_OPT(pg_class); /* relation referenced by
													 * foreign key */
  ```
- [pg_squeeze@REL1_9_4 · pg_squeeze.c:3193-3195](https://github.com/cybertec-postgresql/pg_squeeze/blob/400c5f6ae9bc911073a6824e9a19f4d475fb7331/pg_squeeze.c#L3193-L3195)
  Excerpt:
  ```text
  swaptemp = relform1->relfilenode;
		relform1->relfilenode = relform2->relfilenode;
		relform2->relfilenode = swaptemp;
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F1

### F3 · Inaccurate · Safe · The cleanup can hide retained rows from older snapshots
Location: Article · exact quote · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=TRUNCATE%20big_table%3B%20INSERT%20INTO%20big_table%20SELECT%20%2A%20FROM%20temp_keep_big_table%3B)
Article says:
```text
…TRUNCATE big_table; INSERT INTO big_table SELECT * FROM temp_keep_big_table;…
```
What is true:
TRUNCATE can make the table appear empty to older snapshots after commit. truncate.sgml:147-149 documents this behavior. Transactions that already accessed this table block truncation. Older snapshots from other work can survive the lock. Reinserting retained rows does not make them visible to those snapshots.
So what:
Drain transactions holding older snapshots before this maintenance. Use batched DELETE when concurrent snapshot consistency must continue.
Charitable reading:
Accepting several minutes of blocked table access does not establish that all older snapshots have ended.
Review: We tested whether the exclusive lock drains every older snapshot. E-17 explicitly preserves the counterexample involving transactions accessing other tables. We tested whether accepting maintenance blocking removes the snapshot risk. ACCESS EXCLUSIVE waits for transactions already accessing this table. Older snapshots established elsewhere can remain. The documented empty-table result supports the consequence and the instruction to drain older snapshots.

Sources:
- [REL_18_6 · doc/src/sgml/ref/truncate.sgml:120-122](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/truncate.sgml#L120-L122)
  Excerpt:
  ```text
  <command>TRUNCATE</command> cannot be used on a table that has foreign-key
   references from other tables, unless all such tables are also truncated
   in the same command.  Checking validity in such cases would require table
  ```
- [REL_18_6 · doc/src/sgml/ref/truncate.sgml:147-149](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/truncate.sgml#L147-L149)
  Excerpt:
  ```text
  <command>TRUNCATE</command> is not MVCC-safe.  After truncation, the table will
   appear empty to concurrent transactions, if they are using a snapshot
   taken before the truncation occurred.
  ```
- [REL_18_6 · doc/src/sgml/mvcc.sgml:1840-1844](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/mvcc.sgml#L1840-L1844)
  Excerpt:
  ```text
  snapshot taken before the DDL command committed.  This will only be an
    issue for a transaction that did not access the table in question
    before the DDL command started &mdash; any transaction that has done so
    would hold at least an <literal>ACCESS SHARE</literal> table lock,
    which would block the DDL command until that transaction completes.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F3

## Verified accurate claims (15)

### F6 · Accurate · Factual · PostgreSQL 10 supports LIST, RANGE, and subpartitioning
Location: Article · exact quote · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=Partitioning%20in%20Postgres%20is%20recursive)
Article says:
```text
Partitioning in Postgres is recursive…
```
What is true:
PostgreSQL 10 supports LIST, RANGE, automatic insert routing, and subpartitioning. REL_10_0 ddl.sgml:2901-2915 documents these features. REL_18_6 ddl.sgml:4108-4114 also documents subpartitioning. Whole-partition deletion avoids bulk DELETE vacuum overhead at ddl.sgml:3997-4003.
Charitable reading:
The version-10 statement concerns partitioning availability. It does not promise every later partitioning improvement.
Review: We checked the PostgreSQL 10 floor instead of assuming current features existed then. RANGE, LIST, routing, and subpartitioning appear there. We checked the PostgreSQL 10 feature floor rather than inferring it from current documentation. REL_10_0 explicitly supports routing, LIST, RANGE, and subpartitioning. The report does not extend that finding to later partitioning features.

Sources:
- [REL_18_6 · doc/src/sgml/ddl.sgml:3997-4003](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ddl.sgml#L3997-L4003)
  Excerpt:
  ```text
  Bulk loads and deletes can be accomplished by adding or removing
       partitions, if the usage pattern is accounted for in the
       partitioning design.  Dropping an individual partition
       using <command>DROP TABLE</command>, or doing <command>ALTER TABLE
       DETACH PARTITION</command>, is far faster than a bulk
       operation.  These commands also entirely avoid the
       <command>VACUUM</command> overhead caused by a bulk <command>DELETE</command>.
  ```
- [REL_10_0 · doc/src/sgml/ddl.sgml:2901-2906](https://github.com/postgres/postgres/blob/5df0e99bea1c3e5fbffa7fbd0982da88ea149bb6/doc/src/sgml/ddl.sgml#L2901-L2906)
  Qualification: Version note: Checked the article's PostgreSQL 10 version floor.
  Excerpt:
  ```text
  All rows inserted into a partitioned table will be routed to one of the
    <firstterm>partitions</firstterm> based on the value of the partition
    key.  Each partition has a subset of the data defined by its
    <firstterm>partition bounds</firstterm>.  Currently supported
    partitioning methods include range and list, where each partition is
    assigned a range of keys and a list of keys, respectively.
  ```
- [REL_10_0 · doc/src/sgml/ddl.sgml:2910-2915](https://github.com/postgres/postgres/blob/5df0e99bea1c3e5fbffa7fbd0982da88ea149bb6/doc/src/sgml/ddl.sgml#L2910-L2915)
  Qualification: Version note: Checked the article's PostgreSQL 10 version floor.
  Excerpt:
  ```text
  Partitions may themselves be defined as partitioned tables, using what is
    called <firstterm>sub-partitioning</firstterm>.  Partitions may have their
    own indexes, constraints and default values, distinct from those of other
    partitions.  Indexes must be created separately for each partition.  See
    <xref linkend="sql-createtable"> for more details on creating partitioned
    tables and partitions.
  ```
- [REL_18_6 · doc/src/sgml/ddl.sgml:4108-4114](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ddl.sgml#L4108-L4114)
  Excerpt:
  ```text
  Partitions may themselves be defined as partitioned tables, resulting
    in <firstterm>sub-partitioning</firstterm>.  Although all partitions
    must have the same columns as their partitioned parent, partitions may
    have their
    own indexes, constraints and default values, distinct from those of other
    partitions.  See <xref linkend="sql-createtable"/> for more details on
    creating partitioned tables and partitions.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F6

### F7 · Accurate · Factual · DELETE retains row versions for later cleanup
Location: Article · exact quote · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=When%20rows%20mutate%2C%20Postgres%20can,versions%20of%20the%20same%20row)
Article says:
```text
…When rows mutate, Postgres can maintain multiple versions of the same row…
```
What is true:
DELETE records transaction metadata in the heap tuple at heapam.c:3123-3130. It leaves physical cleanup for later. maintenance.sgml:169-174 documents reusable space and the limited tail-page exception for returning space to the operating system.
Charitable reading:
The article describes ordinary heap tables and typical vacuum behavior. Its word typically allows tail-page truncation.
Review: We tested tail-page truncation as a counterexample. The finding explicitly retains that exception and accurately describes DELETE metadata. We checked the tail-page exception as a possible counterexample. The report explicitly preserves it. DELETE's tuple metadata and VACUUM's later reclamation support the retained-version explanation.

Sources:
- [REL_18_6 · src/backend/access/heap/heapam.c:3123-3130](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/heap/heapam.c#L3123-L3130)
  Excerpt:
  ```text
  /* store transaction information of xact deleting the tuple */
	tp.t_data->t_infomask &= ~(HEAP_XMAX_BITS | HEAP_MOVED);
	tp.t_data->t_infomask2 &= ~HEAP_KEYS_UPDATED;
	tp.t_data->t_infomask |= new_infomask;
	tp.t_data->t_infomask2 |= new_infomask2;
	HeapTupleHeaderClearHotUpdated(tp.t_data);
	HeapTupleHeaderSetXmax(tp.t_data, new_xmax);
	HeapTupleHeaderSetCmax(tp.t_data, cid, iscombo);
  ```
- [REL_18_6 · doc/src/sgml/maintenance.sgml:169-174](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/maintenance.sgml#L169-L174)
  Excerpt:
  ```text
  The standard form of <command>VACUUM</command> removes dead row
    versions in tables and indexes and marks the space available for
    future reuse.  However, it will not return the space to the operating
    system, except in the special case where one or more pages at the
    end of a table become entirely free and an exclusive table lock can be
    easily obtained.  In contrast, <command>VACUUM FULL</command> actively compacts
  ```
- [REL_18_6 · doc/src/sgml/mvcc.sgml:42-47](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/mvcc.sgml#L42-L47)
  Excerpt:
  ```text
  data consistency is maintained by using a multiversion
    model (Multiversion Concurrency Control, <acronym>MVCC</acronym>).
    This means that each SQL statement sees
    a snapshot of data (a <firstterm>database version</firstterm>)
    as it was some
    time ago, regardless of the current state of the underlying data.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F7

### F8 · Accurate · Factual · Index scans can mark entries dead after checking the heap
Location: Article · exact quote · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=an%20index%20scan%20that%20finds,the%20entry%20as%20dead%20itself.)
Article says:
```text
…an index scan that finds a dead row can mark the entry as dead itself.
```
What is true:
DELETE defers index-tuple removal to vacuum in nodeModifyTable.c:1807-1809. indexam.c:692-699 requests dead-entry marking after finding an entirely dead HOT chain. Recovery scans skip this optimization.
Charitable reading:
The article says can and best-effort. It does not promise that every index scan removes every dead entry.
Review: We checked whether dead-entry marking requires more than one invisible tuple. The finding correctly specifies an entirely dead HOT chain. We tested whether the claim promises immediate removal or applies during recovery. The article says marking can occur. The report preserves the all-dead HOT-chain condition and recovery exception shown in indexam.c.

Sources:
- [REL_18_6 · src/backend/executor/nodeModifyTable.c:1808-1809](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/executor/nodeModifyTable.c#L1808-L1809)
  Excerpt:
  ```text
  * take care of it later.  We can't delete index tuples immediately
		 * anyway, since the tuple is still visible to other transactions.
  ```
- [REL_18_6 · src/backend/access/index/indexam.c:692-699](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/index/indexam.c#L692-L699)
  Excerpt:
  ```text
  * If we scanned a whole HOT chain and found only dead tuples, tell index
	 * AM to kill its entry for that TID (this will take effect in the next
	 * amgettuple call, in index_getnext_tid).  We do not do this when in
	 * recovery because it may violate MVCC to do so.  See comments in
	 * RelationGetIndexScan().
	 */
	if (!scan->xactStartedInRecovery)
		scan->kill_prior_tuple = all_dead;
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F8

### F9 · Accurate · Factual · DROP TABLE and TRUNCATE take ACCESS EXCLUSIVE locks
Location: Article · exact quote · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=DROP%20TABLE%20and%20TRUNCATE%20require%20a%20heavyweight%20AccessExclusiveLock)
Article says:
```text
…DROP TABLE and TRUNCATE require a heavyweight AccessExclusiveLock…
```
What is true:
RemoveRelations initializes AccessExclusiveLock at tablecmds.c:1553. truncate.sgml:111-114 documents the same lock for TRUNCATE. The lock blocks concurrent operations on each affected table.
Charitable reading:
The article identifies a table lock. Its later acceptance of maintenance blocking is an explicit operating assumption.
Review: We checked DROP and TRUNCATE separately. Both support ACCESS EXCLUSIVE locking without asserting a database-wide lock. We checked DROP's lock initialization and TRUNCATE's documented lock. Both support ACCESS EXCLUSIVE. The report confines blocking to affected tables rather than claiming a database-wide lock.

Sources:
- [REL_18_6 · src/backend/commands/tablecmds.c:1553-1553](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/tablecmds.c#L1553-L1553)
  Excerpt:
  ```text
  LOCKMODE	lockmode = AccessExclusiveLock;
  ```
- [REL_18_6 · doc/src/sgml/ref/truncate.sgml:111-114](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/truncate.sgml#L111-L114)
  Excerpt:
  ```text
  <command>TRUNCATE</command> acquires an <literal>ACCESS EXCLUSIVE</literal> lock on each
   table it operates on, which blocks all other concurrent operations
   on the table.  When <literal>RESTART IDENTITY</literal> is specified, any
   sequences that are to be restarted are likewise locked exclusively.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F9

### F10 · Accurate · Factual · CREATE TEMP TABLE AS copies the selected retained rows
Location: excerpt · section “A performant one-off delete” · as fetched 2026-11-03 · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=CREATE%20TEMP%20TABLE%20temp_keep_big_table%20AS,big_table%20WHERE%20updated_at%20%3E%3D%20%272026%2D04%2D01%27)
Article says:
```text
…CREATE TEMP TABLE temp_keep_big_table AS SELECT * FROM big_table WHERE updated_at >= '2026-04-01'…
```
What is true:
CREATE TABLE AS copies SELECT output once. create_table_as.sgml:39-44 documents the resulting column names and types. The displayed cutoff keeps rows whose compatible updated_at value meets the comparison. This checks statement structure and semantics, not the unknown table schema.
Charitable reading:
The example assumes big_table exists and updated_at supports comparison with the date literal.
Review: We tested whether the finding certifies unknown schema dependencies. It expressly limits verification to statement structure and compatible column types. We tested whether the finding certifies the complete recipe or an unknown schema. It explicitly excludes both. CREATE TABLE AS documentation supports copying the SELECT output under the stated type assumptions.

Sources:
- [REL_18_6 · doc/src/sgml/ref/create_table_as.sgml:39-44](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/create_table_as.sgml#L39-L44)
  Excerpt:
  ```text
  <command>CREATE TABLE AS</command> creates a table and fills it
   with data computed by a <command>SELECT</command> command.
   The table columns have the
   names and data types associated with the output columns of the
   <command>SELECT</command> (except that you can override the column
   names by giving an explicit list of new column names).
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F10

### F11 · Accurate · Factual · pg_squeeze reclaims unused table space through an online rewrite
Location: Article · exact quote · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=pg_squeeze%20is%20for%20optimizing%20tables%20that%20already%20have%20significant%20bloat.)
Article says:
```text
pg_squeeze is for optimizing tables that already have significant bloat.
```
What is true:
pg_squeeze README.md:1-4 describes concurrent space reclamation. Lines 17-18 specify logical decoding for concurrent changes. pg_squeeze.c:3193-3195 swaps physical storage identifiers. The article's broad online-rewrite analogy holds, but these mechanisms differ from trigger capture and table-name swaps.
Charitable reading:
The article calls the analogy roughly equivalent. We do not treat that qualification as an exact implementation claim.
Review: We tested the trigger and rename analogy against implementation. The finding preserves the broad analogy while naming both mechanism differences. We tested the analogy against pg_squeeze's actual capture and cutover mechanisms. Logical decoding and storage-identifier swapping differ from triggers and renaming. The report states those differences while validating only the broad online-rewrite analogy.

Sources:
- [pg_squeeze@REL1_9_4 · README.md:1-4](https://github.com/cybertec-postgresql/pg_squeeze/blob/400c5f6ae9bc911073a6824e9a19f4d475fb7331/README.md#L1-L4)
  Excerpt:
  ```text
  PostgreSQL extension that removes unused space from a table and optionally
sorts tuples according to particular index (as if [CLUSTER][2] command was
executed concurrently with regular reads / writes). In fact we try to replace
[`pg_repack`][1] extension.
  ```
- [pg_squeeze@REL1_9_4 · README.md:17-18](https://github.com/cybertec-postgresql/pg_squeeze/blob/400c5f6ae9bc911073a6824e9a19f4d475fb7331/README.md#L17-L18)
  Excerpt:
  ```text
  that we use [logical decoding][4] instead of triggers to capture concurrent
changes.
  ```
- [pg_squeeze@REL1_9_4 · pg_squeeze.c:3193-3195](https://github.com/cybertec-postgresql/pg_squeeze/blob/400c5f6ae9bc911073a6824e9a19f4d475fb7331/pg_squeeze.c#L3193-L3195)
  Excerpt:
  ```text
  swaptemp = relform1->relfilenode;
		relform1->relfilenode = relform2->relfilenode;
		relform2->relfilenode = swaptemp;
  ```
- [pg_squeeze@REL1_9_4 · README.md:1-4](https://github.com/cybertec-postgresql/pg_squeeze/blob/400c5f6ae9bc911073a6824e9a19f4d475fb7331/README.md#L1-L4)
  Excerpt:
  ```text
  PostgreSQL extension that removes unused space from a table and optionally
sorts tuples according to particular index (as if [CLUSTER][2] command was
executed concurrently with regular reads / writes). In fact we try to replace
[`pg_repack`][1] extension.
  ```
- [pg_squeeze@REL1_9_4 · README.md:16-18](https://github.com/cybertec-postgresql/pg_squeeze/blob/400c5f6ae9bc911073a6824e9a19f4d475fb7331/README.md#L16-L18)
  Excerpt:
  ```text
  As for (2), one important difference (besides the use of background workers) is
that we use [logical decoding][4] instead of triggers to capture concurrent
changes.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F11

### F12 · Accurate · Factual · PostgreSQL 10 supports the described partitioning methods
Location: Article · exact quote · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=Since%20version%2010%2C%20Postgres%20has%20had%20great%20partitioning%20support.)
Article says:
```text
…Since version 10, Postgres has had great partitioning support.
```
What is true:
PostgreSQL 10 supports declarative RANGE and LIST partitioning. REL_10_0 doc/src/sgml/release-10.sgml:1595 confirms both methods. doc/src/sgml/ddl.sgml:3104 documents subpartitioning.
Charitable reading:
The sentence identifies the availability of declarative partitioning. Its description of quality is subjective.
Review: We checked the historical release and subpartition syntax. Both support the finding, although F6 covers substantially the same claim. We checked release-10.sgml and the PostgreSQL 10 subpartitioning instructions. Both support the feature claim. The report correctly avoids treating the article's quality adjective as a measurable guarantee.

Sources:
- [REL_10_0 · doc/src/sgml/release-10.sgml:1595-1595](https://github.com/postgres/postgres/blob/5df0e99bea1c3e5fbffa7fbd0982da88ea149bb6/doc/src/sgml/release-10.sgml#L1595-L1595)
  Qualification: Version note: Checked the article's PostgreSQL 10 version floor.
  Excerpt:
  ```text
  The syntax supports range and list partitioning.
  ```
- [REL_10_0 · doc/src/sgml/ddl.sgml:3104-3106](https://github.com/postgres/postgres/blob/5df0e99bea1c3e5fbffa7fbd0982da88ea149bb6/doc/src/sgml/ddl.sgml#L3104-L3106)
  Qualification: Version note: Checked the article's PostgreSQL 10 version floor.
  Excerpt:
  ```text
  To implement sub-partitioning, specify the
       <literal>PARTITION BY</literal> clause in the commands used to create
       individual partitions, for example:
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F12

### F13 · Accurate · Factual · DELETE does not immediately reclaim deleted row storage
Location: Article · exact quote · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=big%20batch%20DELETE%20operations%20don%27t,free%20up%20physical%20disk%20space)
Article says:
```text
…big batch DELETE operations don't immediately free up physical disk space…
```
What is true:
DELETE retains old row versions until cleanup can reclaim them. REL_18_6 doc/src/sgml/maintenance.sgml:157 states that DELETE does not immediately remove the old row version.
Charitable reading:
The claim concerns ordinary DELETE execution, before subsequent cleanup or table rewriting.
Review: We distinguished immediate DELETE effects from later vacuum cleanup. E-55 directly supports the narrower claim. We tested whether later cleanup contradicts the immediate-storage claim. maintenance.sgml explicitly says DELETE does not immediately remove old row versions. The finding does not extend this evidence to replication overhead.

Sources:
- [REL_18_6 · doc/src/sgml/maintenance.sgml:157-158](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/maintenance.sgml#L157-L158)
  Excerpt:
  ```text
  <command>UPDATE</command> or <command>DELETE</command> of a row does not
    immediately remove the old version of the row.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F13

### F14 · Accurate · Factual · VACUUM FULL rewrites the table under ACCESS EXCLUSIVE
Location: Article · exact quote · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=VACUUM%20FULL%20allows%20for%20this%2C,lock%20for%20a%20long%20time.)
Article says:
```text
VACUUM FULL allows for this, but takes an expensive lock for a long time.
```
What is true:
VACUUM FULL compacts the table through a file rewrite. REL_18_6 doc/src/sgml/maintenance.sgml:131 documents ACCESS EXCLUSIVE locking. The rewrite can take substantial time.
Charitable reading:
The article describes VACUUM FULL on a substantial table. It does not promise a fixed lock duration.
Review: We tested whether a small table defeats the duration claim. The finding says the rewrite can take substantial time. We tested whether the report asserts a guaranteed long duration. It says the rewrite can take substantial time. The cited documentation supports both the file rewrite and ACCESS EXCLUSIVE lock.

Sources:
- [REL_18_6 · doc/src/sgml/maintenance.sgml:131-134](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/maintenance.sgml#L131-L134)
  Excerpt:
  ```text
  <command>VACUUM FULL</command> requires an
    <literal>ACCESS EXCLUSIVE</literal> lock on the table it is
    working on, and therefore cannot be done in parallel with other use
    of the table.  Generally, therefore,
  ```
- [REL_18_6 · doc/src/sgml/maintenance.sgml:174-176](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/maintenance.sgml#L174-L176)
  Excerpt:
  ```text
  easily obtained.  In contrast, <command>VACUUM FULL</command> actively compacts
    tables by writing a complete new version of the table file with no dead
    space.  This minimizes the size of the table, but can take a long time.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F14

### F15 · Accurate · Factual · One parent-row deletion can cascade to many child rows
Location: Article · exact quote · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=using%20foreign%20keys%20and%20CASCADE,to%20delete%20gigabytes%20of%20data)
Article says:
```text
…using foreign keys and CASCADE for deletions can cause a single row delete to delete gigabytes of data…
```
What is true:
ON DELETE CASCADE automatically deletes referencing rows. REL_18_6 doc/src/sgml/ddl.sgml:1294 documents that behavior. A large collection of referencing rows can occupy gigabytes.
Charitable reading:
The article says a cascade can delete gigabytes. It does not claim every cascade deletes that amount.
Review: We checked whether the finding treats gigabytes as guaranteed. It correctly makes deleted volume depend on referencing rows. We tested whether the gigabyte statement requires a measured example. Both article and report describe a possibility. CASCADE deletes referencing rows, whose aggregate size has no stated gigabyte restriction.

Sources:
- [REL_18_6 · doc/src/sgml/ddl.sgml:1294-1295](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ddl.sgml#L1294-L1295)
  Excerpt:
  ```text
  <literal>CASCADE</literal> specifies that when a referenced row is deleted,
    row(s) referencing it should be automatically deleted as well.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F15

### F16 · Accurate · Factual · Partition removal avoids deleting each expired row
Location: Article · exact quote · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=a%20workload%20that%20does%20%22lots,does%20%22occasional%20DROP%20TABLE%20.%22)
Article says:
```text
…a workload that does "lots of DELETE " into a workload that does "occasional DROP TABLE ."…
```
What is true:
Dropping an expired partition avoids individual row deletion. REL_18_6 doc/src/sgml/ddl.sgml:4324 documents this advantage and the parent-table lock. TRUNCATE also avoids scanning table rows.
Charitable reading:
The claim applies when the retention predicate matches complete partitions.
Review: We tested retention predicates that cut across partitions. The finding restricts its claim to expired partitions and includes parent locking. We tested the strategy against predicates that cut through partitions. The report limits its approval to whole-partition expiration. Documentation supports avoiding individual deletions and identifies the parent-table lock.

Sources:
- [REL_18_6 · doc/src/sgml/ddl.sgml:4324-4327](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ddl.sgml#L4324-L4327)
  Excerpt:
  ```text
  This can very quickly delete millions of records because it doesn't have
     to individually delete every record.  Note however that the above command
     requires taking an <literal>ACCESS EXCLUSIVE</literal> lock on the parent
     table.
  ```
- [REL_18_6 · doc/src/sgml/ref/truncate.sgml:33-38](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/truncate.sgml#L33-L38)
  Excerpt:
  ```text
  <command>TRUNCATE</command> quickly removes all rows from a set of
   tables. It has the same effect as an unqualified
   <command>DELETE</command> on each table, but since it does not actually
   scan the tables it is faster. Furthermore, it reclaims disk space
   immediately, rather than requiring a subsequent <command>VACUUM</command>
   operation. This is most useful on large tables.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F16

### F17 · Accurate · Factual · ACCESS EXCLUSIVE blocks concurrent table access
Location: Article · exact quote · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=this%20prevents%20other%20transactions%20from%20reading%20or%20writing%20the%20table)
Article says:
```text
…this prevents other transactions from reading or writing the table…
```
What is true:
ACCESS EXCLUSIVE blocks other concurrent operations on the table. REL_18_6 doc/src/sgml/ref/truncate.sgml:111 documents the same lock and its blocking behavior.
Charitable reading:
The claim concerns concurrent access to the locked table during the cleanup transaction.
Review: We checked lock scope and duration. The finding concerns concurrent access to the affected table during the transaction. We tested whether the lock claim certifies snapshot safety or the full cleanup transaction. The finding certifies only concurrent table-access blocking. truncate.sgml directly supports that narrower statement.

Sources:
- [REL_18_6 · doc/src/sgml/ref/truncate.sgml:111-113](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/truncate.sgml#L111-L113)
  Excerpt:
  ```text
  <command>TRUNCATE</command> acquires an <literal>ACCESS EXCLUSIVE</literal> lock on each
   table it operates on, which blocks all other concurrent operations
   on the table.  When <literal>RESTART IDENTITY</literal> is specified, any
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F17

### F18 · Accurate · Factual · Read Committed queries can observe different snapshots
Location: Article · exact quote · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=different%20transactions%20can%20see%20row,the%20time%20they%20were%20queried)
Article says:
```text
…different transactions can see row values as of the time they were queried…
```
What is true:
Read Committed SELECT queries observe committed data from their query-start snapshots. REL_18_6 doc/src/sgml/mvcc.sgml:324 documents this behavior.
Charitable reading:
The sentence says transactions can observe query-time snapshots. It does not assign that behavior to every isolation level.
Review: We tested Repeatable Read as a counterexample. The finding explicitly limits its explanation to Read Committed SELECT queries. We tested Repeatable Read as a counterexample to a universal snapshot claim. The article says transactions can observe query-time values. The report specifically identifies Read Committed, which the cited text supports.

Sources:
- [REL_18_6 · doc/src/sgml/mvcc.sgml:324-326](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/mvcc.sgml#L324-L326)
  Excerpt:
  ```text
  execution.  In effect, a <command>SELECT</command> query sees
    a snapshot of the database as of the instant the query begins to
    run.   However, <command>SELECT</command> does see the effects
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F18

### F19 · Accurate · Factual · 64-byte shared buffer descriptors match the default 8 KiB page calculation
Location: Article · exact quote · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=%28a%20BufferDesc%20%2C%20padded%20to,bytes%29%20for%20every%208KB%20buffer)
Article says:
```text
…(a BufferDesc , padded to 64 bytes) for every 8KB buffer…
```
What is true:
PostgreSQL pads shared buffer descriptors to 64 bytes on ordinary 64-bit builds. configure.ac:253 defaults pages to 8,192 bytes. src/backend/storage/buffer/buf_init.c:78 allocates one padded descriptor per buffer.
Charitable reading:
The article describes the ordinary 64-bit build with the default block size.
Review: We checked pointer-size padding and configurable block sizes. The finding states the ordinary 64-bit build and default-page assumptions. We checked custom block sizes and pointer-width exceptions. The report explicitly assumes ordinary 64-bit builds and default pages. The padding macro and allocation expressions support one 64-byte descriptor per 8,192-byte buffer.

Sources:
- [REL_18_6 · src/include/storage/buf_internals.h:293-293](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/storage/buf_internals.h#L293-L293)
  Excerpt:
  ```text
  #define BUFFERDESC_PAD_TO_SIZE	(SIZEOF_VOID_P == 8 ? 64 : 1)
  ```
- [REL_18_6 · configure.ac:253-260](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/configure.ac#L253-L260)
  Excerpt:
  ```text
  PGAC_ARG_REQ(with, blocksize, [BLOCKSIZE], [set table block size in kB [8]],
             [blocksize=$withval],
             [blocksize=8])
case ${blocksize} in
  1) BLCKSZ=1024;;
  2) BLCKSZ=2048;;
  4) BLCKSZ=4096;;
  8) BLCKSZ=8192;;
  ```
- [REL_18_6 · src/backend/storage/buffer/buf_init.c:78-78](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/buffer/buf_init.c#L78-L78)
  Excerpt:
  ```text
  NBuffers * sizeof(BufferDescPadded),
  ```
- [REL_18_6 · src/backend/storage/buffer/buf_init.c:85-85](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/buffer/buf_init.c#L85-L85)
  Excerpt:
  ```text
  NBuffers * (Size) BLCKSZ + PG_IO_ALIGN_SIZE,
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F19

### F20 · Accurate · Factual · 128 GiB of default buffers has approximately 1 GiB of descriptors
Location: Article · exact quote · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=with%20128GB%20of%20shared%20buffers%2C,only%20~1GB%20of%20memory%2C%20sequentially)
Article says:
```text
…with 128GB of shared buffers, you are sweeping only ~1GB of memory, sequentially…
```
What is true:
Descriptors occupy 1/128 of buffer storage (derived: 64 bytes / 8,192 bytes). A 128 GiB pool has approximately 1 GiB of descriptors. src/backend/storage/buffer/bufmgr.c:4791 walks descriptors sequentially in its full-scan branch. An optimization can avoid that scan.
Charitable reading:
The example estimates descriptor memory for the full-scan branch, using PostgreSQL’s conventional binary memory units.
Review: We recomputed 64/8192 and checked the scan bypass. The calculation holds, and the finding makes no elapsed-time guarantee. We recomputed the descriptor ratio and checked the scan optimization. A 128 GiB buffer pool has 1 GiB of descriptors (derived: 128 GiB × 64 / 8,192). The report excludes elapsed-time validation and acknowledges that some drops avoid the full scan.

Sources:
- [REL_18_6 · src/include/storage/buf_internals.h:293-293](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/storage/buf_internals.h#L293-L293)
  Excerpt:
  ```text
  #define BUFFERDESC_PAD_TO_SIZE	(SIZEOF_VOID_P == 8 ? 64 : 1)
  ```
- [REL_18_6 · configure.ac:253-260](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/configure.ac#L253-L260)
  Excerpt:
  ```text
  PGAC_ARG_REQ(with, blocksize, [BLOCKSIZE], [set table block size in kB [8]],
             [blocksize=$withval],
             [blocksize=8])
case ${blocksize} in
  1) BLCKSZ=1024;;
  2) BLCKSZ=2048;;
  4) BLCKSZ=4096;;
  8) BLCKSZ=8192;;
  ```
- [REL_18_6 · src/backend/storage/buffer/buf_init.c:78-78](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/buffer/buf_init.c#L78-L78)
  Excerpt:
  ```text
  NBuffers * sizeof(BufferDescPadded),
  ```
- [REL_18_6 · src/backend/storage/buffer/buf_init.c:85-85](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/buffer/buf_init.c#L85-L85)
  Excerpt:
  ```text
  NBuffers * (Size) BLCKSZ + PG_IO_ALIGN_SIZE,
  ```
- [REL_18_6 · src/backend/storage/buffer/bufmgr.c:4791-4795](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/buffer/bufmgr.c#L4791-L4795)
  Excerpt:
  ```text
  for (i = 0; i < NBuffers; i++)
	{
		RelFileLocator *rlocator = NULL;
		BufferDesc *bufHdr = GetBufferDescriptor(i);
		uint32		buf_state;
  ```
- [REL_18_6 · src/backend/storage/buffer/bufmgr.c:4724-4727](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/buffer/bufmgr.c#L4724-L4727)
  Excerpt:
  ```text
  /*
	 * We can avoid scanning the entire buffer pool if we know the exact size
	 * of each of the given relation forks. See DropRelationBuffers.
	 */
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F20

## Notes (not graded) (2)

### F4 · Note ·  · The cleanup writes WAL beyond retained heap rows
Location: excerpt · section “A performant one-off delete” · as fetched 2026-11-03 · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=the%20only%20data%20written%20to,reinserted%20rows%20in%20the%20big_table)
Article says:
```text
…the only data written to the Write Ahead Log (WAL) are the reinserted rows in the big_table…
```
What is true:
TRUNCATE and index maintenance also write WAL. tablecmds.c:2331-2337 emits the truncation record for logical decoding. nodeModifyTable.c:1238-1243 inserts index entries. nbtinsert.c:1389 writes their WAL records. The retained-row strategy still avoids logging row-by-row deletions.
Charitable reading:
The claim correctly describes the dominant retained-row payload. It overstates that reduction with the word only.
Explanation: Not graded: no reader would act differently on it.
Review: We checked WAL conditions and the charitable payload interpretation. The finding identifies logical decoding and treats this distinction as an ungraded note. We read retained rows as the dominant payload rather than a complete WAL inventory. Index insertion and truncation logging support the narrower correction. The existing note severity preserves that charitable reading and makes no WAL-volume claim.

Sources:
- [REL_18_6 · src/backend/commands/tablecmds.c:2331-2337](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/tablecmds.c#L2331-L2337)
  Excerpt:
  ```text
  XLogBeginInsert();
		XLogRegisterData(&xlrec, SizeOfHeapTruncate);
		XLogRegisterData(logrelids, list_length(relids_logged) * sizeof(Oid));

		XLogSetRecordFlags(XLOG_INCLUDE_ORIGIN);

		(void) XLogInsert(RM_HEAP_ID, XLOG_HEAP_TRUNCATE);
  ```
- [REL_18_6 · src/backend/executor/nodeModifyTable.c:1238-1243](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/executor/nodeModifyTable.c#L1238-L1243)
  Excerpt:
  ```text
  /* insert index entries for tuple */
			if (resultRelInfo->ri_NumIndices > 0)
				recheckIndexes = ExecInsertIndexTuples(resultRelInfo,
													   slot, estate, false,
													   false, NULL, NIL,
													   false);
  ```
- [REL_18_6 · src/backend/access/nbtree/nbtinsert.c:1389-1389](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/nbtree/nbtinsert.c#L1389-L1389)
  Excerpt:
  ```text
  recptr = XLogInsert(RM_BTREE_ID, xlinfo);
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F4

### F5 · Note ·  · Visibility maps mark pages without dead tuples
Location: Article · exact quote · [open in article](https://planetscale.com/blog/the-only-scalable-delete#:~:text=visibility%20maps%20to%20skip%20over%20%22dead%20tuples.%22)
Article says:
```text
…visibility maps to skip over "dead tuples."…
```
What is true:
Visibility maps identify all-visible pages, rather than dead tuples to skip. storage.sgml:658-663 describes these page flags. DELETE clears visibility-map bits in heapam.c:3113-3120. Tuple visibility checks use transaction and snapshot information.
Charitable reading:
Visibility maps help vacuum skip pages and index-only scans avoid heap access. They do not mark individual dead rows.
Explanation: Not graded: no reader would act differently on it.
Review: We considered visibility maps as a broad scanning optimization. Page flags still do not identify individual dead tuples. Note severity fits. We tested whether page-skipping behavior validates the article's wording. Visibility maps identify all-visible pages, not individual dead tuples. DELETE clears those page flags. The report appropriately limits this correction to a note.

Sources:
- [REL_18_6 · doc/src/sgml/storage.sgml:658-663](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/storage.sgml#L658-L663)
  Excerpt:
  ```text
  The visibility map stores two bits per heap page.  The first bit, if set,
indicates that the page is all-visible, or in other words that the page does
not contain any tuples that need to be vacuumed.
This information can also be used
by <link linkend="indexes-index-only-scans"><firstterm>index-only
scans</firstterm></link> to answer queries using only the index tuple.
  ```
- [REL_18_6 · src/backend/access/heap/heapam.c:3113-3120](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/heap/heapam.c#L3113-L3120)
  Excerpt:
  ```text
  if (clear_all_visible)
	{
		/* It's possible the VM bits were already clear */
		if (visibilitymap_clear_locked(relation, BufferGetBlockNumber(buffer),
									   vmbuffer, VISIBILITYMAP_VALID_BITS))
			vmbuffer_modified = true;

		PageClearAllVisible(page);
  ```
- [REL_18_6 · src/backend/access/heap/heapam.c:3123-3130](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/heap/heapam.c#L3123-L3130)
  Excerpt:
  ```text
  /* store transaction information of xact deleting the tuple */
	tp.t_data->t_infomask &= ~(HEAP_XMAX_BITS | HEAP_MOVED);
	tp.t_data->t_infomask2 &= ~HEAP_KEYS_UPDATED;
	tp.t_data->t_infomask |= new_infomask;
	tp.t_data->t_infomask2 |= new_infomask2;
	HeapTupleHeaderClearHotUpdated(tp.t_data);
	HeapTupleHeaderSetXmax(tp.t_data, new_xmax);
	HeapTupleHeaderSetCmax(tp.t_data, cid, iscombo);
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c#F5

## Withdrawn findings (0)

None.

## Section checks

- Deletion strategy · A · 1 verified-accurate · 66% of claims (4 of 6, plus 1 that need data we do not have) · Dropping expired partitions avoids deleting each row when retention boundaries match partition boundaries.
- Deletes hurt · A · 6 verified-accurate · 100% of claims (14 of 14, plus 3 that need data we do not have) · DELETE retains row versions, but visibility maps describe pages rather than individual dead tuples.
- Whole-table deletion · A · 3 verified-accurate · 73% of claims (11 of 15, plus 1 that need data we do not have) · ACCESS EXCLUSIVE locking and the 64-byte descriptor calculation hold. The calculation does not establish execution time.
- One-off cleanup · D · 1 dangerous-recipe · 2 verified-accurate · 100% of claims (12 of 12, plus 1 that need data we do not have) · ACCESS EXCLUSIVE blocks table access, but TRUNCATE can hide retained rows from older snapshots.
- Online cleanup and batches · D · 1 dangerous-recipe · 1 verified-accurate · 100% of claims (5 of 5, plus 4 that need data we do not have) · Renaming tables preserves foreign-key targets. pg_squeeze uses logical decoding and swaps physical storage identifiers.
- Partition-based retention · A · 2 verified-accurate · 100% of claims (11 of 11) · PostgreSQL 10 supports the described RANGE, LIST, and recursive partitioning methods.

## Claim coverage

- Deletion strategy: 4 of 6 Postgres claims checked, plus 1 that need data we do not have; not counted: 2 product or opinion, 2 not a claim; not checked: 2 for other reasons
- Deletes hurt: 14 of 14 Postgres claims checked, plus 3 that need data we do not have; not counted: 3 product or opinion, 3 duplicate, 2 not a claim
- Whole-table deletion: 11 of 15 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 product or opinion, 1 not a claim; not checked: 4 for other reasons
- One-off cleanup: 12 of 12 Postgres claims checked, plus 1 that need data we do not have; not counted: 5 product or opinion, 1 duplicate, 3 not a claim
- Online cleanup and batches: 5 of 5 Postgres claims checked, plus 4 that need data we do not have; not counted: 1 product or opinion, 1 not a claim
- Partition-based retention: 11 of 11 Postgres claims checked; not counted: 2 product or opinion, 2 not a claim
- Conclusion: 2 claims are the author's own account; nothing checkable; not counted: 1 product or opinion, 1 duplicate, 1 not a claim

## What we did not check

- We did not execute the cleanup recipe or verify its table schema, privileges, triggers, or runtime behavior.
- We did not reproduce the cleanup duration or measure the 128 GB buffer-cache sweep.
- We did not reproduce the article's cleanup timings or measure its scalability claims.
- We did not check the buffer-cache sweep, WAL accounting, or replication-lag claims.
- We did not validate the cleanup recipes against table dependencies, permissions, generated columns, identities, or triggers.
- We did not verify the article's claim that batching avoids lock pileups or lets autovacuum keep up.
- We did not establish a release-by-release history for pg_squeeze or pg_partman.
- We did not reproduce the cleanup example’s reported runtime or verify its row counts.
- We did not measure DROP TABLE execution time with 128 GiB of shared buffers.
- We could not compare the cleanup recipe’s input and restored rows because the article provides no sample output.
- We did not check the cleanup recipe’s dependencies, permissions, schema compatibility, or runtime effects.
- central claim: evidence check did not finish
- Factual: we did not complete every applicable check.
- Applicable: we did not complete every applicable check.
- Consistent: we did not complete every applicable check.
- Transparent: we did not complete every applicable check.
- Safe: we did not complete every applicable check.
- Transparent: claims sourced check did not finish.
- Transparent: claims dated check did not finish.
- Transparent: interest disclosed check did not finish.
- Transparent: author dated check did not finish.
- We could not confirm whether finding F1 fails loudly.
- We could not confirm whether finding F3 fails loudly.
- experiments: check did not finish
- production actions: check did not finish
- No code blocks were checked for syntax.
- 1 block was not checked for syntax.
- Code block 1 was not checked for syntax because the language is not supported or not declared.
- We did not execute any scripts or check dependencies, setup, permissions, embedded SQL, function bodies, inline snippets, or run-time effects.

## Notes

- B+ — the findings address the article's main subject. What we did not check is listed below. We checked partition removal, DELETE cleanup, table locks, buffer descriptors, and the copy-and-truncate recipe against PostgreSQL source and documentation.
- We did not check everything in this article. What we did not check is listed below, in the words we recorded at the time. None of it moved the letter. We never charge our own limits to the article.
- Average of 5 axes: 3.4 · result B+
- Dropping expired partitions avoids individual row deletion and its vacuum overhead. PostgreSQL 10 supports the described partitioning methods. DELETE retains row versions for later cleanup. The 64-byte buffer-descriptor calculation also holds.
- The cleanup advice omits prerequisites that affect correctness. Atomic table renames preserve existing foreign-key targets. TRUNCATE can hide retained rows from older snapshots despite the exclusive lock. The WAL and visibility-map explanations also overstate their mechanisms.
- Some explanatory text is not shown in this edition; the grade and findings are complete.
- Some checks did not happen for this edition, and each one we know of is listed above.
- Checked against: github.com/postgres/postgres REL_18_6 at commit 724edf9bde9d356724ad384a2e196edc3c9f80f7 (pinned target); github.com/cybertec-postgresql/pg_squeeze REL1_9_4 at commit 400c5f6ae9bc911073a6824e9a19f4d475fb7331 (pinned target); github.com/pgpartman/pg_partman v5.5.0 at commit f7e83b9c441c7e97066d815bbe14e02a9dc5ff94 (pinned target); https://planetscale.com/blog/author/tom (fetched 2026-11-03T02:12:29.257498Z); https://planetscale.com/blog/keeping-a-postgres-queue-healthy (fetched 2026-11-03T02:12:30.559698Z).
- Article captured 2026-11-03T02:12:13.610198Z · SHA-256 bab64aaa1f3d992484e16302decdf2d3e0cc15b62ffb82a2f04cf045ec5b8228 · Text extracted from the article's HTML.
- Policy SHA-256 bc68e9d00f58ea51eb84a6ea550567f063feefe9a394d9e84b52707f544fbc61 · Grading rules SHA-256 6fb334e79d6b9e7ed81d3238cc10d9de602ff87ed65ff2fa781f53bac5798765.
- We did not execute the cleanup recipe or verify its application-specific schema, privileges, triggers, or runtime effects.
- We did not parse the displayed CREATE TEMP TABLE statement. Documentation supports its structure and semantics.
- We did not reproduce cleanup timings, verify row counts, or measure DROP TABLE execution with 128 GiB of shared buffers.
- The article provides no sample output for comparing copied and restored rows.
- We did not measure replication lag or verify that batches of 10,000 rows prevent lock pileups and keep autovacuum current.
- We did not establish release-by-release behavior for pg_squeeze or pg_partman.
- The article gives June 11, 2026 without a publication time. We represent that date at midnight UTC.
- source: pg_squeeze names no release in the article, so it was read at 1.9.4, the latest at fetch time
- source: pg_partman names no release in the article, so it was read at 5.5.0, the latest at fetch time
- review: the findings were written by one model and reviewed independently by a different model.
- 6 passages in this edition fell short of our own plain-English rules.
- Built from the article text captured above, 3 pinned source trees, and 2 fetched pages.
- 19 survived · 0 weakened · 0 withdrawn.

## Edition changes

- F1 · recalibrated.
- F3 · recalibrated.
- F4 · recalibrated.
- F5 · recalibrated.
- F6 · recalibrated.
- F7 · recalibrated.
- F8 · recalibrated.
- F9 · recalibrated.
- F10 · recalibrated.
- F11 · recalibrated.
- F12 · recalibrated.
- F13 · recalibrated.
- F14 · recalibrated.
- F15 · recalibrated.
- F16 · recalibrated.
- F17 · recalibrated.
- F18 · recalibrated.
- F19 · recalibrated.
- F20 · recalibrated.

## Revision history

- [Revision 1](https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c?v=2) · 2026-10-31 14:30 UTC · D+ · audited with v1.1.4
  Article as first submitted. 16 accurate · 2 wrong · 0 caveats.
  ElephantSeal: D+. Open: the benchmark cannot yet be rerun from what is published; the production risk is not yet fixed or warned about; central claim not checked.
  Changes: First audit. Open: F1 “A name swap leaves foreign keys attached to the original table” (dangerous); F2 “Dropping a retention partition also locks its parent” (misleading).
- [Revision 2](https://pgtrue.postgres.ai/shared/brief/ba676115-b32d-46ee-84e8-c21330a8981c?v=4) · this page · 2026-11-03 02:12 UTC · B+ · audited with v1.1.5
  Same article text, re-audited. 15 accurate · 2 wrong · 0 caveats.
  ElephantSeal: B+. Open: the production risk is not yet fixed or warned about; central claim not checked.
  Changes: No longer reported: “A name swap leaves foreign keys attached to the original table”; “Dropping a retention partition also locks its parent”. New: F1 “Renaming replacement tables leaves foreign keys attached to the original table” (dangerous); F3 “The cleanup can hide retained rows from older snapshots” (dangerous).

Updated your article? Request a correction. A new edition appears at this address.