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 D+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/14239f4f-56d6-4aae-8687-b72cdf6ba01a.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a)
<a href="https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a"><img src="https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a.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/14239f4f-56d6-4aae-8687-b72cdf6ba01a.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a)
<a href="https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a"><img src="https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a.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/14239f4f-56d6-4aae-8687-b72cdf6ba01a.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a)
<a href="https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a"><img src="https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a.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/14239f4f-56d6-4aae-8687-b72cdf6ba01a.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/radar.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a)
<a href="https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a"><img src="https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/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/14239f4f-56d6-4aae-8687-b72cdf6ba01a/radar.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/radar.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/radar.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a)
<a href="https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a"><img src="https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/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/14239f4f-56d6-4aae-8687-b72cdf6ba01a/radar.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/radar.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/radar.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a)
<a href="https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a"><img src="https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/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/14239f4f-56d6-4aae-8687-b72cdf6ba01a/radar.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/radar.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/wide.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a)
<a href="https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a"><img src="https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/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/14239f4f-56d6-4aae-8687-b72cdf6ba01a/wide.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/wide.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a
   :alt: pgTrue fact-check
   :width: 480
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/wide.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a)
<a href="https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a"><img src="https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/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/14239f4f-56d6-4aae-8687-b72cdf6ba01a/wide.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/wide.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a
   :alt: pgTrue fact-check
   :width: 480
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/wide.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a)
<a href="https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a"><img src="https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/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/14239f4f-56d6-4aae-8687-b72cdf6ba01a/wide.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/14239f4f-56d6-4aae-8687-b72cdf6ba01a/wide.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a
   :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

Getting rid of a 4 TB table in PostgreSQL (opens in new tab)

boringsql.com
Don't run its recipes as written: one can do harm. 3 claims are wrong in all.
0
inaccuracy
1
dangerous-recipe
2
misleading
0
imprecise
0
transcription
0
aged
0
withdrawn
22
verified-accurate

Grade capped at D+ by Safe: 1 finding (F1)

Factual B+ · 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.

InaccuraciesNone in this edition.

Dangerous or recipe bugs

F1

Dangerous recipe: “…xact_start < : 't0'…”

INACCURATESafe · partly holds after review

Claim ledger

Article says
…xact_start < : 't0'…
What is true
REL_18_6 pgstatfuncs.c:37 permits visibility through pg_read_all_stats or privileges of the session owner's role. Otherwise, lines 648-655 hide xact_start. The wait can miss those transactions. A lower identifier committed after the initial copy can escape both copy passes and disappear when the old table drops.
So what
Run the transaction wait as a superuser or a role with pg_read_all_stats privileges. Verify visibility into application transactions before copying.

Source

Source · REL_18_6 · src/backend/utils/adt/pgstatfuncs.c:37-37#define HAS_PGSTAT_PERMISSIONS(role) (has_privs_of_role(GetUserId(), ROLE_PG_READ_ALL_STATS) || has_privs_of_role(GetUserId(), role))

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

In the article · section “Copying the keepers instead”

In the article

excerpt · section “Copying the keepers instead” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

Copying the keepers instead

CREATE TABLE build_logs_new ( LIKE build_logs INCLUDING DEFAULTS INCLUDING CONSTRAINTS EXCLUDING IDENTITY ); ALTER TABLE build_logs_new ALTER id ADD GENERATED ALWAYS AS IDENTITY ; SELECT max (id) AS hwm, clock_timestamp() AS t0 FROM build_logs \gset -- wait until no other transaction that started before t0 is still open SELECT pid, state , xact_start FROM pg_stat_activity WHERE pid <> pg_backend_pid() AND datname = current_database() AND xact_start < : 't0' \watch 0 . 5 min_rows = 1 INSERT INTO build_logs_new OVERRIDING SYSTEM VALUE SELECT * FROM build_logs WHERE id > 25200000 AND id <= :hwm; ALTER TABLE build_logs_new ADD PRIMARY KEY (id); CREATE INDEX build_logs_new_project_idx ON build_logs_new (project_id, created_at);
INSERT 0 2801207 Time: 5227.946 ms (00:05.228) ALTER TABLE Time: 1365.478 ms (00:01.365) CREATE INDEX Time: 992.124 ms wal_records | wal_fpi |  wal -------------+---------+-------- 2803416 |    8155 | 882 MB
All sources and excerpts · 4
Evidence#define HAS_PGSTAT_PERMISSIONS(role) (has_privs_of_role(GetUserId(), ROLE_PG_READ_ALL_STATS) || has_privs_of_role(GetUserId(), role))
Evidence if (beentry->st_xact_start_timestamp != 0 && beentry->st_backendType != B_WAL_SENDER) values[8] = TimestampTzGetDatum(beentry->st_xact_start_timestamp);
Evidence { /* No permissions to view data about this session */ values[5] = CStringGetTextDatum("<insufficient privilege>"); nulls[4] = true; nulls[6] = true; nulls[7] = true; nulls[8] = true;
Evidence /* No permissions to view data about this session */ values[5] = CStringGetTextDatum("<insufficient privilege>"); nulls[4] = true; nulls[6] = true; nulls[7] = true; nulls[8] = true;

Version note: The same visibility restriction exists in the pinned PostgreSQL 19 source.

How the review tested this

Review: E-15 also permits visibility through privileges of the session owner's role. The blanket statement about other roles excludes this exception. Unrelated application roles still support the missing-row scenario and data-loss consequence. We tested the same-role reading against separate application and migration roles. NULL transaction timestamps defeat the wait for unrelated roles. The article states no statistics-visibility prerequisite. The concrete privilege change prevents the identified row-loss path.

Misleading / imprecise

F2

Renaming a table does not expose readers through existing views

MISLEADINGFactual · holds up after review

Claim ledger

Article says
Any code path that still reads the table fails loudly…
What is true
Existing views continue reading a renamed table through its OID. REL_18_6 src/backend/rewrite/rewriteHandler.c:197 opens rte->relid. The rename changes pg_class.relname in tablecmds.c:4332-4334. A release without missing-table errors does not establish that every reader stopped.
So what
Inspect pg_depend for views and other stored dependencies before treating a rename observation period as proof that the table is unused.
Charitable reading
The rename exposes SQL that resolves the original table name directly. It does not expose every indirect reader.

Source

Source · REL_18_6 · src/backend/rewrite/rewriteHandler.c:197-197rel = table_open(rte->relid, lockmode);

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

In the article · section “Finding out whether anyone still reads it”

In the article

excerpt · section “Finding out whether anyone still reads it” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

Finding out whether anyone still reads it

If I were doing this on my own system I'd also rename the table before dropping it and wait a release cycle. A rename takes the same lock but holds it for a moment, and another rename undoes it. Any code path that still reads the table fails loudly while the data is still there to put back.

All sources and excerpts · 2
Evidence rel = table_open(rte->relid, lockmode);
Evidence namestrcpy(&(relform->relname), newrelname); CatalogTupleUpdate(relrelation, &otid, reltup);
How the review tested this

Review: We tested the direct-name reading against the article's unrestricted claim. Views retain OID references. Checking pg_depend changes the retirement decision. We tested whether the rename claim covers only direct SQL. Its wording covers any code path. Stored views retain relation OIDs. Inspecting dependencies remains a concrete correction with a supported wasted-work consequence.

F3

Updates to old rows do not rule out partition retirement

MISLEADINGFactual · holds up after review

Claim ledger

Article says
Partitioning does nothing for a table that gets updates to old rows…
What is true
Updates do not prevent partition-based retention. REL_18_6 doc/src/sgml/ddl.sgml:3997-3999 permits bulk removal by partition. Lines 4102-4104 explicitly support updates across partition bounds. The retention predicate must cover the retired partition's rows.
So what
Use partition retirement when every row in an expired partition qualifies for removal, even if those rows received updates.
Charitable reading
Updates can make an age-based retention rule unsuitable. The article excludes tables merely because old rows receive updates.

Source

Source · REL_18_6 · doc/src/sgml/ddl.sgml:3997-3999Bulk 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

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

In the article · section “When the table still has traffic”

In the article

excerpt · section “When the table still has traffic” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

When the table still has traffic

Partitioning does nothing for a table that gets updates to old rows, or one that can't be repartitioned this week.

All sources and excerpts · 2
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
Evidence Updating the partition key of a row will cause it to be moved into a different partition if it no longer satisfies the partition bounds of its original partition.
How the review tested this

Review: We considered updates that invalidate age-based retention. E-3 excludes updates categorically. The correction already requires every retired row to qualify. We tested the append-only context and age-based retention hypothesis. Updates alone do not invalidate partition retirement. The finding preserves the requirement that every retired row qualify for removal.

Verified accurate

F4

A waiting DROP can block later reads and writes

ACCURATEFactual · holds up after review

Claim ledger

Article says
…PostgreSQL doesn't let later requests jump an exclusive waiter…
What is true
DROP TABLE selects AccessExclusiveLock in REL_18_6 src/backend/commands/tablecmds.c:1553. That mode conflicts with reads and writes. src/backend/storage/lmgr/proc.c:1786-1792 checks earlier conflicting waiters before granting queued requests.
Charitable reading
The claim describes fresh application requests in the displayed queue, rather than every lock-manager exception.

Source

Source · REL_18_6 · src/backend/storage/lmgr/proc.c:1786-1792/* * Waken if (a) doesn't conflict with requests of earlier waiters, and * (b) doesn't conflict with already-held locks. */ if ((lockMethodTable->conflictTab[lockmode] & aheadRequests) == 0 && !LockCheckConflicts(lockMethodTable, lockmode, lock, proc->waitProcLock))

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

In the article · section “Finding out whether anyone still reads it”

In the article

excerpt · section “Finding out whether anyone still reads it” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

Finding out whether anyone still reads it

The app queries' locks would be compatible with the long reader's, yet blocked_by points at the DROP . It sits in the queue ahead of them, and PostgreSQL doesn't let later requests jump an exclusive waiter. So a table that "nobody really uses anymore" is unavailable for as long as the oldest transaction touching it.

All sources and excerpts · 3
Evidence /* * Waken if (a) doesn't conflict with requests of earlier waiters, and * (b) doesn't conflict with already-held locks. */ if ((lockMethodTable->conflictTab[lockmode] & aheadRequests) == 0 && !LockCheckConflicts(lockMethodTable, lockmode, lock, proc->waitProcLock))
Evidence LOCKMODE lockmode = AccessExclusiveLock;
Evidence /* AccessExclusiveLock */ LOCKBIT_ON(AccessShareLock) | LOCKBIT_ON(RowShareLock) | LOCKBIT_ON(RowExclusiveLock) | LOCKBIT_ON(ShareUpdateExclusiveLock) | LOCKBIT_ON(ShareLock) | LOCKBIT_ON(ShareRowExclusiveLock) | LOCKBIT_ON(ExclusiveLock) | LOCKBIT_ON(AccessExclusiveLock)
How the review tested this

Review: We checked whether queue exceptions defeat the demonstrated fresh requests. Earlier conflicting waiters block those requests under E-23. We checked lock conflicts and waiter ordering. The finding correctly limits its conclusion to the described fresh requests.

F5

Dropping a foreign-key child can exclusively lock its referenced table

ACCURATEFactual · holds up after review

Claim ledger

Article says
…dropping the child takes AccessExclusiveLock on the parent…
What is true
Foreign-key action triggers belong to the referenced relation. REL_18_6 src/backend/commands/tablecmds.c:13927-13948 creates them there. Removing a trigger opens its relation with AccessExclusiveLock in src/backend/commands/trigger.c:1323-1328.
Charitable reading
The parent means the table referenced by the child's outgoing foreign key.

Source

Source · REL_18_6 · src/backend/commands/trigger.c:1323-1328/* * Open and exclusive-lock the relation the trigger belongs to. */ relid = ((Form_pg_trigger) GETSTRUCT(tup))->tgrelid; rel = table_open(relid, AccessExclusiveLock);

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

In the article · section “Finding out whether anyone still reads it”

In the article

excerpt · section “Finding out whether anyone still reads it” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

Finding out whether anyone still reads it

The standard fix is a short lock timeout ( SET lock_timeout = '2s' ) and a retry loop around the DROP , and GitLab already has one: their migration framework wraps DDL in with_lock_retries . Their migration style guide also warns that when the table has foreign keys to another table, the DROP TABLE "is likely to stall concurrent traffic", so each foreign key goes in its own migration first. I checked in pg_locks : dropping the child takes AccessExclusiveLock on the parent (a projects table, say), because the enforcement triggers live there. The whole queue problem now applies to your hottest table.

All sources and excerpts · 2
Evidence /* * Open and exclusive-lock the relation the trigger belongs to. */ relid = ((Form_pg_trigger) GETSTRUCT(tup))->tgrelid; rel = table_open(relid, AccessExclusiveLock);
Evidence trigAddress = CreateTrigger(fk_trigger, NULL, refRelOid, myRelOid, constraintOid, indexOid, InvalidOid, parentDelTrigger, NULL, true, false);
How the review tested this

Review: We checked which relation owns the foreign-key action trigger. E-27 places it on the referenced relation. E-26 locks that relation exclusively. We checked which relation owns foreign-key action triggers. Removing those triggers exclusively locks the referenced relation.

F6

Commit deletes relation files after releasing relation locks

ACCURATEFactual · holds up after review

Claim ledger

Article says
On the primary the backend unlinks them after it has released its locks…
What is true
Primary commit schedules file deletion after releasing locks. REL_18_6 src/backend/access/transam/xact.c:2449-2453 states that ordering. Commit replay releases standby locks at line 6208 and deletes files at line 6239. Synchronous deletion delays subsequent replay.
Charitable reading
The statement concerns commit-time deletion of ordinary relation storage.

Source

Source · REL_18_6 · src/backend/access/transam/xact.c:2435-2453 * this may take many seconds, also delay until after releasing locks. * Other backends will observe the attendant catalog changes and not * attempt to access affected files. */ smgrDoPendingDeletes(true);

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

In the article · section “What the replicas see”

In the article

excerpt · section “What the replicas see” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

What the replicas see

The files. On the primary the backend unlinks them after it has released its locks, and xact.c says why: the deletion "may take many seconds". The standby keeps the same order ( xact_redo_commit() calls StandbyReleaseLockTree() first and DropRelationFiles() after), so a reader isn't held up by the unlinking itself. What differs is who does the work. On the primary it's the committing backend and everyone else carries on. On a standby the startup process does it, and replay waits.

All sources and excerpts · 4
Evidence * this may take many seconds, also delay until after releasing locks. * Other backends will observe the attendant catalog changes and not * attempt to access affected files. */ smgrDoPendingDeletes(true);
Evidence StandbyReleaseLockTree(xid, parsed->nsubxacts, parsed->subxacts);
Evidence DropRelationFiles(parsed->xlocators, parsed->nrels, true);
Evidence * For regular relations, we don't unlink the first segment file of the rel, * but just truncate it to zero length, and record a request to unlink it after * the next checkpoint. Additional segments can be unlinked immediately, * however. Leaving the empty file in place prevents that relfilenumber
How the review tested this

Review: We checked commit ordering and the deferred first-segment exception. Lock release precedes pending deletion. E-31 preserves the checkpoint qualification. We checked primary cleanup ordering and standby replay ordering. Both release relation locks before file deletion. The finding does not claim immediate primary deletion of every segment.

F7

Standby feedback does not prevent DROP relation-lock conflicts

ACCURATEFactual · holds up after review

Claim ledger

Article says
hot_standby_feedback doesn't help, because it's about row versions and not locks…
What is true
Recovery acquires AccessExclusiveLock in REL_18_6 src/backend/storage/ipc/standby.c:1027. Feedback prevents cleanup conflicts, not that lock conflict. doc/src/sgml/config.sgml:5158 sets the streaming-delay default to 30 seconds. That allowance covers received WAL, rather than granting every query 30 seconds.
Charitable reading
The article distinguishes row-version cleanup conflicts from relation-lock conflicts.

Source

Source · REL_18_6 · src/backend/storage/ipc/standby.c:1025-1027SET_LOCKTAG_RELATION(locktag, dbOid, relOid); (void) LockAcquire(&locktag, AccessExclusiveLock, true, false);

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

In the article · section “What the replicas see”

In the article

excerpt · section “What the replicas see” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

What the replicas see

Thirty seconds later the reader was killed, which is the default max_standby_streaming_delay . hot_standby_feedback doesn't help, because it's about row versions and not locks. The log lines are there because log_recovery_conflict_waits = on , and I'd switch that on before any change like this one. Without it the wait is invisible.

All sources and excerpts · 3
Evidence SET_LOCKTAG_RELATION(locktag, dbOid, relOid); (void) LockAcquire(&locktag, AccessExclusiveLock, true, false);
Evidence be used to eliminate query cancels caused by cleanup records, but can cause database bloat on the primary for some workloads.
Evidence The default is 30 seconds.
How the review tested this

Review: We tested whether feedback addresses the replay lock. E-33 addresses cleanup conflicts. E-32 independently acquires AccessExclusiveLock. We checked feedback scope and the streaming-delay documentation. Feedback addresses cleanup conflicts. Recovery still acquires the conflicting relation lock. The finding correctly qualifies the 30-second allowance.

F8

The batching procedure commits separate transactions

ACCURATEFactual · holds up after review

Claim ledger

Article says
…Each COMMIT ends a real transaction, not a subtransaction.
What is true
Procedure COMMIT ends the current transaction and starts another automatically. REL_18_6 doc/src/sgml/plpgsql.sgml:3704-3718 documents this behavior. Exception blocks form subtransactions. ref/call.sgml:95-98 forbids procedure transaction control when CALL runs inside an explicit transaction block.
Charitable reading
The procedure runs through a top-level CALL outside an explicit transaction block, as the article requires.

Source

Source · REL_18_6 · doc/src/sgml/plpgsql.sgml:3704-3718it is possible to end transactions using the commands <command>COMMIT</command> and <command>ROLLBACK</command>. A new transaction is started automatically after a transaction is ended using these commands, so there is no separate <command>START TRANSACTION</command> command.

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

In the article · section “Deleting in batches”

In the article

excerpt · section “Deleting in batches” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

Deleting in batches

Each COMMIT ends a real transaction, not a subtransaction. CALL has to run outside BEGIN (otherwise invalid transaction termination ), and the procedure can't wrap the DELETE in an EXCEPTION block.

CREATE PROCEDURE purge_batched(p_upto bigint , p_batch int ) LANGUAGE plpgsql AS $$ DECLARE v_lo bigint : = 0 ; BEGIN WHILE v_lo < p_upto LOOP DELETE FROM build_logs WHERE id > v_lo AND id <= least (v_lo + p_batch, p_upto); v_lo : = v_lo + p_batch; COMMIT ; END LOOP ; END $$; CALL purge_batched( 25200000 , 50000 );
All sources and excerpts · 3
Evidence it is possible to end transactions using the commands <command>COMMIT</command> and <command>ROLLBACK</command>. A new transaction is started automatically after a transaction is ended using these commands, so there is no separate <command>START TRANSACTION</command> command.
Evidence Under the hood, a block with exception handlers forms a subtransaction, which means that transactions cannot be ended inside such a block.
Evidence If <command>CALL</command> is executed in a transaction block, then the called procedure cannot execute transaction control statements.
How the review tested this

Review: We checked explicit transaction blocks and exception handlers as counterexamples. The article requires a top-level CALL outside a transaction block. We checked top-level CALL and exception-block restrictions. The article states both prerequisites. This finding verifies transaction semantics without certifying execution of the complete recipe.

F9

DELETE leaves index-tuple removal to vacuum

ACCURATEFactual · holds up after review

Claim ledger

Article says
A DELETE doesn't touch the indexes.
What is true
DELETE does not immediately remove index tuples because other transactions may still need them. REL_18_6 src/backend/executor/nodeModifyTable.c:1804-1810 documents this behavior. Ordinary vacuum can truncate empty trailing pages, as src/backend/access/heap/vacuumlazy.c:3221 states.
Charitable reading
The sentence means DELETE leaves index-tuple removal to vacuum. Its scan can read indexes and change hints.

Source

Source · REL_18_6 · src/backend/executor/nodeModifyTable.c:1804-1810* Note: Normally one would think that we have to delete index tuples * associated with the heap tuple now... * * ... but in POSTGRES, we have no need to do this because VACUUM will * 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 · section “Deleting in batches”

In the article

excerpt · section “Deleting in batches” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

Deleting in batches

A DELETE doesn't touch the indexes. Vacuum cleans them later along with the heap, and its full page images are cheaper because a pruned page is mostly empty space that the image skips. What vacuum can't do is give back anything but empty pages at the very end of the file. Here the surviving 10% are the newest rows and sit at the end, so there's nothing for vacuum to truncate.

All sources and excerpts · 2
Evidence * Note: Normally one would think that we have to delete index tuples * associated with the heap tuple now... * * ... but in POSTGRES, we have no need to do this because VACUUM will * take care of it later. We can't delete index tuples immediately * anyway, since the tuple is still visible to other transactions.
Evidence * lazy_truncate_heap - try to truncate off any empty pages at the end
How the review tested this

Review: We considered index reads and hint changes during DELETE. The finding expressly limits its conclusion to deferred index-tuple removal. We tested the literal index-access reading. The finding already narrows the claim to index-tuple removal. Its distinction between deletion and vacuum matches the source.

F10

Checksums and wal_log_hints enable post-checkpoint hint images

ACCURATEFactual · holds up after review

Claim ledger

Article says
wal_log_hints = on has the same effect without checksums.
What is true
REL_18_6 src/include/access/xlog.h:120 enables hint protection for checksums or wal_log_hints. src/backend/storage/buffer/bufmgr.c:5493-5504 explains the first-post-checkpoint image. Disabling both removes those hint images without disabling pruning WAL.
Charitable reading
The claim compares hint-image generation under the demonstrated checksum and WAL settings, rather than promising identical total WAL.

Source

Source · REL_18_6 · src/include/access/xlog.h:120-120#define XLogHintBitIsNeeded() (DataChecksumsEnabled() || wal_log_hints)

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

In the article · section “The first SELECT after the delete”

In the article

excerpt · section “The first SELECT after the delete” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

The first SELECT after the delete

wal_log_hints = on has the same effect without checksums. pg_rewind needs one or the other, so a cluster that relies on it already logs hints.

checksums on checksums off delete WAL 8253 MB 8252 MB first count(*) WAL 7850 MB 173 MB full page images in the first count(*) 961,036 890,644 first count(*) time 34.8 s 14.1 s
All sources and excerpts · 2
Evidence#define XLogHintBitIsNeeded() (DataChecksumsEnabled() || wal_log_hints)
Evidence * If we need to protect hint bit updates from torn writes, WAL-log a * full page image of the page. This full page image is only necessary * if the hint bit update is the first change to the page since the * last checkpoint.
How the review tested this

Review: We checked whether identical hint protection implies identical total WAL. The finding limits equivalence to hint images under the demonstrated settings. We checked the hint-protection predicate and checkpoint condition. The finding verifies hint-image behavior and excludes the displayed byte totals.

F11

Foreign-key creation and validation use the stated lock modes

ACCURATEFactual · holds up after review

Claim ledger

Article says
…VALIDATE CONSTRAINT only needs SHARE UPDATE EXCLUSIVE on the child and ROW SHARE on the parent.
What is true
Foreign-key creation opens the referenced table with ShareRowExclusiveLock in REL_18_6 src/backend/commands/tablecmds.c:10105-10111. Validation uses SHARE UPDATE EXCLUSIVE on the child and ROW SHARE on the referenced table. doc/src/sgml/ref/alter_table.sgml:1502-1529 documents those modes.
Charitable reading
The quoted modes describe validation of a foreign key on an ordinary table.

Source

Source · REL_18_6 · src/backend/commands/tablecmds.c:10099-10116if (OidIsValid(fkconstraint->old_pktable_oid)) pkrel = table_open(fkconstraint->old_pktable_oid, ShareRowExclusiveLock); else pkrel = table_openrv(fkconstraint->pktable, ShareRowExclusiveLock);

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

In the article · section “Copying the keepers instead”

In the article

excerpt · section “Copying the keepers instead” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

Copying the keepers instead

Foreign keys: incoming ones point at the old table's OID, not its name, and have to be recreated. ADD FOREIGN KEY takes SHARE ROW EXCLUSIVE on the referenced table even with NOT VALID ; VALIDATE CONSTRAINT only needs SHARE UPDATE EXCLUSIVE on the child and ROW SHARE on the parent. Outgoing ones are the projects problem from earlier.

All sources and excerpts · 2
Evidence if (OidIsValid(fkconstraint->old_pktable_oid)) pkrel = table_open(fkconstraint->old_pktable_oid, ShareRowExclusiveLock); else pkrel = table_openrv(fkconstraint->pktable, ShareRowExclusiveLock);
Evidence a <literal>SHARE UPDATE EXCLUSIVE</literal> lock on the table being altered. (If the constraint is a foreign key then a <literal>ROW SHARE</literal> lock is also required on the table referenced by the constraint.)
How the review tested this

Review: We checked creation separately from validation. E-42 and E-43 support the distinct referenced-table lock modes. We checked creation separately from validation. The source supports ShareRowExclusiveLock during creation and the lighter documented validation locks.

F12

PostgreSQL 19 concurrent REPACK uses logical decoding without a WHERE clause

ACCURATEFactual · holds up after review

Claim ledger

Article says
REPACK (CONCURRENTLY) in PostgreSQL 19 does it with logical decoding but has no WHERE clause.
What is true
The pinned PostgreSQL 19 implementation creates a logical decoding context in src/backend/commands/repack_worker.c:271-287. doc/src/sgml/ref/repack.sgml:24-35 lists the command syntax without WHERE. The parser's RepackStmt productions likewise omit row filtering.
Charitable reading
The article explicitly assigns this feature to PostgreSQL 19, rather than its PostgreSQL 18.6 experiments.

Source

Source · REL_19_STABLE@472da35ac0 · src/backend/commands/repack_worker.c:271-287ctx = CreateInitDecodingContext(PGREPACK_PLUGIN,

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

In the article · section “Copying the keepers instead”

In the article

excerpt · section “Copying the keepers instead” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

Copying the keepers instead

Updates and deletes to rows that were already copied: the catch-up only finds new ids. A trigger on the old table recording changed ids, applied again inside the swap, is what pg_repack has used for years. REPACK (CONCURRENTLY) in PostgreSQL 19 does it with logical decoding but has no WHERE clause.

All sources and excerpts · 2
Evidence ctx = CreateInitDecodingContext(PGREPACK_PLUGIN,
EvidenceREPACK [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ] [ <replaceable class="parameter">table_and_columns</replaceable> [ USING INDEX [ <replaceable class="parameter">index_name</replaceable> ] ] ] REPACK [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ] USING INDEX
How the review tested this

Review: We checked for confusion with PostgreSQL 18.6. E-12 explicitly names PostgreSQL 19. Its implementation and documented syntax support the conclusion. We checked whether PostgreSQL 18 evidence had been applied to PostgreSQL 19. The citations use the correct PostgreSQL 19 pin. They show logical decoding and command syntax without WHERE.

F13

PostgreSQL 18 initdb enables checksums by default

ACCURATEFactual · holds up after review

Claim ledger

Article says
…data checksums on (the 18 default)…
What is true
Both REL_18_0 and REL_18_6 initialize data_checksums to true in src/bin/initdb/initdb.c:167. The article correctly describes the initialization default.
Charitable reading
The default applies to newly initialized PostgreSQL 18 clusters. Upgraded clusters can retain their prior checksum state.

Source

Source · REL_18_0 · src/bin/initdb/initdb.c:167-167static bool data_checksums = true;

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)…data checksums on (the 18 default)…
All sources and excerpts · 2
Evidencestatic bool data_checksums = true;

Version note: Checks the article's PostgreSQL 18 version floor.

Evidencestatic bool data_checksums = true;
How the review tested this

Review: We considered upgraded clusters as a counterexample. The finding correctly restricts the default to initialization and checks both 18.0 and 18.6. We checked PostgreSQL 18.0 and 18.6. Both initialization defaults enable checksums. The finding correctly limits the claim to initialization.

F14

Direct table-name lookup retries after a concurrent rename

ACCURATEFactual · holds up after review

Claim ledger

Article says
Queries blocked on the lock resolve the table name again once it's granted…
What is true
RangeVarGetRelidExtended repeats name lookup after relevant invalidations during lock acquisition. REL_18_6 src/backend/catalog/namespace.c:616-623 states this behavior. The demonstrated direct-name queries can consequently resolve the replacement table after the swap.
Charitable reading
The statement concerns the demonstrated direct-name queries waiting during relation-name resolution. Existing views retain OID references, as A2 explains.

Source

Source · REL_18_6 · src/backend/catalog/namespace.c:616-623/* * Something may have changed. Let's repeat the name lookup, to make * sure this name still references the same relation it did * previously. */ retry = true; oldRelId = relId;

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)Queries blocked on the lock resolve the table name again once it's granted…
All sources and excerpts · 1
Evidence /* * Something may have changed. Let's repeat the name lookup, to make * sure this name still references the same relation it did * previously. */ retry = true; oldRelId = relId;
How the review tested this

Review: We considered stored OID references as a counterexample. The finding limits its conclusion to direct-name lookup after relevant invalidations. We checked lookup retry conditions after lock acquisition. Relevant invalidations trigger another lookup. The finding limits its conclusion to direct-name queries and excludes measured timings.

F15

GitLab documents with_lock_retries

ACCURATEFactual · holds up after review

Claim ledger

Article says
…their migration framework wraps DDL in with_lock_retries…
What is true
GitLab's migration guide documents with_lock_retries for controlling lock acquisition retries and timeouts. The article correctly identifies the helper.
Charitable reading
The sentence identifies an available migration helper rather than promising identical behavior for every migration.

Source

Source · https://docs.gitlab.com/development/migration_style_guide/with_lock_retries method enables explicit control over lock acquisition retries and timeout configuration

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

In the article · section “Finding out whether anyone still reads it”

In the article

excerpt · section “Finding out whether anyone still reads it” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

Finding out whether anyone still reads it

The standard fix is a short lock timeout ( SET lock_timeout = '2s' ) and a retry loop around the DROP , and GitLab already has one: their migration framework wraps DDL in with_lock_retries . Their migration style guide also warns that when the table has foreign keys to another table, the DROP TABLE "is likely to stall concurrent traffic", so each foreign key goes in its own migration first. I checked in pg_locks : dropping the child takes AccessExclusiveLock on the parent (a projects table, say), because the enforcement triggers live there. The whole queue problem now applies to your hottest table.

All sources and excerpts · 1
Evidencewith_lock_retries method enables explicit control over lock acquisition retries and timeout configuration
How the review tested this

Review: We checked whether the finding certifies every migration path. It only verifies the documented with_lock_retries helper. We checked whether documentation establishes implementation behavior. The finding only confirms the documented helper and its purpose.

F16

GitLab recommends separate foreign-key removal migrations

ACCURATEFactual · holds up after review

Claim ledger

Article says
…each foreign key goes in its own migration first.
What is true
GitLab's migration guide says to drop each foreign key in a separate migration to avoid lock contention. The article accurately repeats that recommendation.
Charitable reading
The instruction applies to dropping a table with multiple outgoing foreign keys.

Source

Source · https://docs.gitlab.com/development/migration_style_guide/you must drop each key in a separate migration to avoid lock contention.

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

In the article · section “Finding out whether anyone still reads it”

In the article

excerpt · section “Finding out whether anyone still reads it” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

Finding out whether anyone still reads it

The standard fix is a short lock timeout ( SET lock_timeout = '2s' ) and a retry loop around the DROP , and GitLab already has one: their migration framework wraps DDL in with_lock_retries . Their migration style guide also warns that when the table has foreign keys to another table, the DROP TABLE "is likely to stall concurrent traffic", so each foreign key goes in its own migration first. I checked in pg_locks : dropping the child takes AccessExclusiveLock on the parent (a projects table, say), because the enforcement triggers live there. The whole queue problem now applies to your hottest table.

All sources and excerpts · 1
Evidenceyou must drop each key in a separate migration to avoid lock contention.
How the review tested this

Review: We checked the migration recommendation against E-52. The guide explicitly calls for separate foreign-key removal migrations. We checked the recommendation's scope. GitLab explicitly recommends separate migrations for individual foreign keys.

F17

The 60-second and 8 MB defaults match GitLab documentation

ACCURATEFactual · holds up after review

Claim ledger

Article says
…max_replication_lag_time behind (60 seconds by default). max_replication_difference (8 MB)…
What is true
GitLab documents max_replication_lag_time as 60 seconds and max_replication_difference as 8 MB. The article reports both defaults correctly.
Charitable reading
The article describes documented defaults, not the customer's actual configuration.

Source

Source · https://docs.gitlab.com/administration/postgresql/database_load_balancing/max_replication_difference The amount of data (in bytes) a secondary is allowed to lag behind when it has not replicated data recently. 8 MB max_replication_lag_time The maximum number of seconds a secondary is allowed to lag behind before it is skipped. 60 seconds

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)…max_replication_lag_time behind (60 seconds by default). max_replication_difference (8 MB)…
All sources and excerpts · 1
Evidencemax_replication_difference The amount of data (in bytes) a secondary is allowed to lag behind when it has not replicated data recently. 8 MB max_replication_lag_time The maximum number of seconds a secondary is allowed to lag behind before it is skipped. 60 seconds
How the review tested this

Review: We checked whether documented defaults establish production settings. The finding claims only the documented 60-second and 8 MB defaults. We tested whether defaults had been presented as production configuration. The finding makes no such claim. Both documented defaults match.

F18

The earlier DELETE post makes the attributed batching recommendation

ACCURATEFactual · holds up after review

Claim ledger

Article says
…batching slower than one big DELETE and worth it for the breathing room…
What is true
The earlier DELETE post says batches may take longer than one DELETE. It recommends batching so PostgreSQL can handle other workloads. The article faithfully summarizes that advice.
Charitable reading
The sentence summarizes the earlier post's recommendation rather than establishing a universal performance result.

Source

Source · https://boringsql.com/posts/deletes-are-difficult/Will this method be faster than performing one massive DELETE? Likely not, especially if you include a wait time between batches to allow PostgreSQL to handle other workloads.

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)…batching slower than one big DELETE and worth it for the breathing room…
All sources and excerpts · 1
EvidenceWill this method be faster than performing one massive DELETE? Likely not, especially if you include a wait time between batches to allow PostgreSQL to handle other workloads.
How the review tested this

Review: We checked the earlier post's conditional performance wording. The finding preserves that qualification and verifies attribution rather than throughput. We checked the earlier post's conditional wording. The finding preserves that qualification by saying batches may take longer.

F19

GitLab's swapping guide contains the ID 1 warning

ACCURATEFactual · holds up after review

Claim ledger

Article says
…with a warning that new rows would otherwise start at id 1.
What is true
GitLab's swapping guide warns that failing to reset the primary-key sequence starts new IDs at 1. The article attributes that warning correctly.
Charitable reading
The sentence attributes the ID 1 warning to GitLab's guide.

Source

Source · https://docs.gitlab.com/development/database/swapping_tables/Failure to reset the primary keys results in newly created rows starting with an ID value of 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 a warning that new rows would otherwise start at id 1.
All sources and excerpts · 1
EvidenceFailure to reset the primary keys results in newly created rows starting with an ID value of 1.
How the review tested this

Review: We considered nondefault sequence starts. The finding verifies the guide's ID 1 warning without generalizing across sequence configurations. We tested the warning against custom sequence configurations. The finding verifies attribution to GitLab's guide without generalizing the warning.

F20

GitLab's postmortem confirms deletion occurred on the primary

ACCURATEFactual · holds up after review

Claim ledger

Article says
It was on the primary.
What is true
GitLab's January 31, 2017 postmortem says an engineer intended to clear the secondary's database directory. The engineer instead executed the deletion on the primary.
Charitable reading
The introduction summarizes GitLab's published incident account.

Source

Source · https://about.gitlab.com/blog/postmortem-of-database-outage-of-january-31/Unfortunately this process was executed on the primary instead.

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)It was on the primary.
All sources and excerpts · 1
EvidenceUnfortunately this process was executed on the primary instead.
How the review tested this

Review: We checked the primary-versus-secondary attribution. E-60 explicitly confirms execution on the primary. We checked the primary-versus-secondary distinction against the first-party postmortem. The account supports the finding.

F21

Both displayed WAL combined-size columns add correctly

ACCURATEFactual · holds up after review

Claim ledger

Article says
…XLOG/FPI_FOR_HINT 959025 46992220 7688857048 7735849268…
What is true
Both displayed WAL rows add correctly. The hint row totals 7.20 GiB. The prune row totals 93.6 MiB. This checks arithmetic, not the underlying measurements.
Charitable reading
The table identifies an earlier run. We checked its column arithmetic independently of later runs.

Checked for internal consistency: the evidence is the article itself.

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

In the article · section “The first SELECT after the delete”

In the article

excerpt · section “The first SELECT after the delete” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

The first SELECT after the delete

Type                       N    Record size        FPI size    Combined size XLOG/FPI_FOR_HINT     959025       46992220      7688857048       7735849268 Heap2/PRUNE_ON_ACCESS 888284       98127982               0         98127982
How the review tested this

Review: We recalculated both byte sums and binary conversions. Both combined-size totals match. The finding does not authenticate measurements. We recomputed both sums and binary-unit conversions. Both totals match. The finding expressly excludes verification of the measurements.

F22

The 256 GiB timings imply a 112-times speedup

ACCURATEFactual · holds up after review

Claim ledger

Article says
…XFS was over a hundred times faster at both sizes.
What is true
The displayed 256 GiB timings imply a 112-times speedup (derived: 4.38 seconds / 0.039 seconds). This exceeds 100 times.
Charitable reading
The speedup compares the two displayed timings for the same 256 GiB table size.

Checked for internal consistency: the evidence is the article itself.

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

In the article · section “What the replicas see”

In the article

excerpt · section “What the replicas see” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

What the replicas see

XFS was over a hundred times faster at both sizes.

How the review tested this

Review: We converted milliseconds before dividing. The displayed ratios are 112 times at 256 GiB and 201 times at 1 TiB. We recomputed both displayed ratios after converting milliseconds. They yield approximately 112 and 201 times. The finding's 256 GiB calculation holds.

F23

The 4 TiB ext4 projection rounds correctly to 70 seconds

ACCURATEFactual · holds up after review

Claim ledger

Article says
At the 16 to 18 ms each I saw on fragmented ext4 that's about 70 seconds.
What is true
Four TiB contains about 4,100 one-GiB segments. The stated rate projects 65.5–73.7 seconds. About 70 seconds follows from those inputs.
Charitable reading
The introduction defines binary size units. The 70-second estimate explicitly extrapolates a measured per-segment rate.

Checked for internal consistency: the evidence is the article itself.

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)At the 16 to 18 ms each I saw on fragmented ext4 that's about 70 seconds.
How the review tested this

Review: We checked binary units and multiplied 4,096 segments by 16–18 milliseconds. The resulting 65.5–73.7 seconds supports the stated projection. We tested decimal versus binary units. The article defines binary sizes. Multiplying 4,096 segments by 16–18 milliseconds gives 65.5–73.7 seconds.

F24

The keeper copy uses 10.8% of displayed batch-delete WAL

ACCURATEFactual · holds up after review

Claim ledger

Article says
…2803416 | 8155 | 882 MB…
What is true
The displayed keeper-copy WAL is 10.8% of batch-delete WAL (derived: 882 MiB / 8,179 MiB). About one tenth is a valid approximation.
Charitable reading
The comparison uses laptop results and excludes subsequent vacuum WAL, as the article states.

Checked for internal consistency: the evidence is the article itself.

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

In the article · section “Copying the keepers instead”

In the article

excerpt · section “Copying the keepers instead” · as fetched 2026-11-03 · open in article ↗ (opens in new tab)

Copying the keepers instead

INSERT 0 2801207 Time: 5227.946 ms (00:05.228) ALTER TABLE Time: 1365.478 ms (00:01.365) CREATE INDEX Time: 992.124 ms wal_records | wal_fpi |  wal -------------+---------+-------- 2803416 |    8155 | 882 MB
How the review tested this

Review: We checked the denominator and matching units. The keeper copy uses 10.8% of displayed batch-delete WAL before vacuum. We checked matching populations and units. Both numbers describe laptop WAL before subsequent vacuum. Their ratio rounds to 10.8%.

F25

The stated 30-second wait is below GitLab's 60-second default

ACCURATEFactual · holds up after review

Claim ledger

Article says
…with the default 30 seconds the lock wait alone stays under their 60…
What is true
GitLab documents a 60-second default for max_replication_lag_time. The article's stated 30-second wait is below that threshold.
Charitable reading
The sentence explicitly assumes default settings. It does not claim the actual GitLab deployment uses them.

Source

Source · https://docs.gitlab.com/administration/postgresql/database_load_balancing/max_replication_lag_time The maximum number of seconds a secondary is allowed to lag behind before it is skipped. 60 seconds

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 the default 30 seconds the lock wait alone stays under their 60…
All sources and excerpts · 1
Evidencemax_replication_lag_time The maximum number of seconds a secondary is allowed to lag behind before it is skipped. 60 seconds
How the review tested this

Review: We tested whether the finding promises replica eligibility despite other lag. It only compares the stated 30-second wait with 60 seconds. We tested whether the comparison guarantees actual replica eligibility. The finding only compares stated defaults. Thirty seconds remains below the documented 60-second threshold.

More in this report

Section checks · 9 sections

Section checks

AspectGradeFindingsCoverage
IntroductionA2 verified-accurate100% of claims (4 of 4, plus 13 that need data we do not have)
Drop costsA1 verified-accurate88% of claims (8 of 9, plus 7 that need data we do not have)
Readers and locksB+1 misleading · 4 verified-accurate88% of claims (15 of 17, plus 3 that need data we do not have)
Replica effectsA4 verified-accurate87% of claims (21 of 24, plus 48 that need data we do not have)
Active tablesB+1 misleading100% of claims (7 of 7, plus 1 that need data we do not have)
Batch deletesA3 verified-accurate95% of claims (21 of 22, plus 17 that need data we do not have)
First readA2 verified-accurate83% of claims (10 of 12, plus 18 that need data we do not have)
Copy and swapD1 dangerous-recipe · 5 verified-accurate96% of claims (52 of 54, plus 9 that need data we do not have)
4 TB recommendationA1 verified-accurate83% of claims (10 of 12, plus 5 that need data we do not have)
Coverage and assessment · Checked 162 of 176 Postgres claims across 11 sections

D+ — the findings address the article's main subject. What we did not check is listed below. The findings directly check DROP locking, replay ordering, deletion WAL, copy-and-swap correctness, and the 4 TiB projection arithmetic.

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 reproduce the displayed measurements or verify the reported hardware and filesystem configurations.
  • We did not check the Linux, ext4, XFS, ZFS, or vmtouch implementations.
  • We did not check pg_repack's trigger implementation.
  • We did not execute the SQL and psql recipes or validate their runtime dependencies.
  • We did not verify PostgreSQL 18.6 availability, PostgreSQL 19 release status, or PostgreSQL 19 REPACK support.
  • We did not reproduce the article's measurements or verify its experiment settings and deployment records.
  • We did not independently check the ext4, XFS, ZFS, vmtouch, or hardware claims.
  • We did not check PostgreSQL source code for the locking, WAL, vacuum, partitioning, or table-swap claims.
  • We did not check the SQL recipes' syntax, setup, dependencies, permissions, function bodies, or runtime effects.
  • We did not establish historical documentation changes between publication and November 3, 2026.
  • We did not independently verify the hardware descriptions, customer deployment, or displayed timing and WAL measurements.
  • We did not verify the 137-byte image average or the number of heap pages the delete touched.
  • We did not check the SQL recipes against PostgreSQL 18.6 or execute their setup and transaction steps.
  • We did not check the WAL and filesystem explanations against PostgreSQL or filesystem source.
  • We could not establish the cache contribution on GitLab's replicas without their RAM and residency measurements.
  • We did not finish checking whether the article reports a benchmark.
  • 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 did not finish checking the article's experiments.
  • We did not finish checking the steps the article gives for production.
  • We did not finish checking whether the article reports a benchmark.

Script checks

  • No code blocks were checked for syntax.
  • 12 blocks were not checked for syntax.
  • Code blocks 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 were 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 162 of 176 Postgres claims across 11 sections
  • Introduction: 4 of 4 Postgres claims checked, plus 13 that need data we do not have; not counted: 3 product or opinion, 2 not a claim
  • Test table: 14 of 15 Postgres claims checked, plus 2 that need data we do not have; not counted: 1 not a claim; not checked: 1 for other reasons
  • Drop costs: 8 of 9 Postgres claims checked, plus 7 that need data we do not have; not counted: 1 not a claim; not checked: 1 for other reasons
  • Readers and locks: 15 of 17 Postgres claims checked, plus 3 that need data we do not have; not counted: 1 product or opinion, 1 not a claim; not checked: 2 for other reasons
  • Replica effects: 21 of 24 Postgres claims checked, plus 48 that need data we do not have; not counted: 3 product or opinion, 2 not a claim; not checked: 3 for other reasons
  • Active tables: 7 of 7 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 product or opinion, 1 duplicate, 1 not a claim
  • Batch deletes: 21 of 22 Postgres claims checked, plus 17 that need data we do not have; not counted: 1 not a claim; not checked: 1 for other reasons
  • First read: 10 of 12 Postgres claims checked, plus 18 that need data we do not have; not counted: 1 not a claim; not checked: 2 for other reasons
  • Copy and swap: 52 of 54 Postgres claims checked, plus 9 that need data we do not have; not counted: 1 product or opinion, 1 not a claim; not checked: 2 for other reasons
  • 4 TB recommendation: 10 of 12 Postgres claims checked, plus 5 that need data we do not have; not counted: 1 product or opinion, 3 duplicate, 3 not a claim; not checked: 2 for other reasons
  • Changelog and footer: 1 claim is the author's own account; nothing checkable; not counted: 1 product or opinion, 2 duplicate, 4 not a claim

Average of 5 axes: 3.26 · worst of factual, consistent, safe: D · result D+

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 D+. Factual B+ · 2 wrong of 25 checked · 0 caveats. Applicable A · 0 checked. Consistent A · 0 wrong of 4 checked · 0 caveats. Transparent A · 0 wrong of 10 checked · 0 caveats. Safe D · 1 wrong of 1 checked · 0 caveats. B+ 2 wrong of 25 checked · 0 caveatsFactual B+2 wrong of 250 caveats A 0 checkedApplicable A0 checked A 0 wrong of 4 checked · 0 caveatsConsistent A0 wrong of 40 caveats A 0 wrong of 10 checked · 0 caveatsTransparent A0 wrong of 100 caveats D 1 wrong of 1 checked · 0 caveatsSafe D1 wrong of 10 caveats D+

By topic: Introduction — 2 findings, 0 wrong · Drop costs — 1 finding, 0 wrong · Readers and locks — 5 findings, 1 wrong · Replica effects — 4 findings, 0 wrong · Active tables — 1 finding, 1 wrong · Batch deletes — 3 findings, 0 wrong · First read — 2 findings, 0 wrong · Copy and swap — 6 findings, 1 wrong · 4 TB recommendation — 1 finding, 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 25 claims, 23 commands scanned.

AxisLetterWrongCaveatsCheckedCoverage
FactualB+2025partly assessed: B+ · 2 wrong of 25 checked · 0 caveats · partly assessed
ApplicableA000partly assessed
ConsistentA004not assessed: A · 0 wrong of 4 checked · 0 caveats
TransparentA0010partly assessed: A · 0 wrong of 10 checked · 0 caveats · partly assessed
SafeD101partly assessed: D · 1 wrong of 1 checked · 0 caveats · partly assessed
Topics · 9 topics

Topics

TopicFactualApplicableConsistentTransparentSafe
Introduction0 issues 2 checked F13 F200 issues 1 checked0 issues 1 checked
Drop costs0 issues 1 checked F60 issues 1 checked
Readers and locks1 issue 5 checked F2 F4 F5 F15 F160 issues 1 checked0 issues 2 checked
Replica effects0 issues 4 checked F7 F17 F22 F250 issues 3 checked0 issues 1 checked0 issues 2 checked
Active tables1 issue 1 checked F30 issues 1 checked
Batch deletes0 issues 3 checked F8 F9 F180 issues 2 checked
First read0 issues 2 checked F10 F210 issues 1 checked
Copy and swap0 issues 6 checked F11 F12 F14 F19 F240 issues 1 checked0 issues 1 checked0 issues 2 checked1 issue 1 checked F1
4 TB recommendation0 issues 1 checked F230 issues 1 checked

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

Revisions: 2 · D+ -> D+

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-11-01 14:26 UTC · D+ · audited with v1.1.4

    Article as first submitted. 24 accurate · 1 wrong · 0 caveats.

    ElephantSeal: D+. Open: the production risk is not yet fixed or warned about.

    Changes: First audit. Open: F20 “Updates do not eliminate partition-based retention” (misleading).

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

    Same article text, re-audited. 22 accurate · 3 wrong · 0 caveats.

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

    Changes: No longer reported: none. New: F1 “…xact_start < : 't0'…” (dangerous); F2 “Renaming a table does not expose readers through existing views” (misleading).

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: Getting rid of a 4 TB table in PostgreSQL

Article title: Getting rid of a 4 TB table in PostgreSQL
Article URL: https://boringsql.com/posts/delete-4tb
Report URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a
Audited revision: 2 of 2, 2026-11-03 02:12:10 UTC
Overall letter: D+

## Axes

- Factual: B+ · 2 wrong · 25 checked · 0 caveats · partly assessed
- Applicable: A · 0 wrong · 0 checked · 0 caveats · partly assessed
- Consistent: A · 0 wrong · 4 checked · 0 caveats · not assessed
- Transparent: A · 0 wrong · 10 checked · 0 caveats · partly assessed
- Safe: D · 1 wrong · 1 checked · 0 caveats · partly assessed

ElephantSeal: D+.
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 (3)

### F1 · Inaccurate · Safe · Dangerous recipe: “…xact_start \< : 't0'…”
Location: excerpt · section “Copying the keepers instead” · as fetched 2026-11-03 · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=xact_start%20%3C%20%3A%20%27t0%27)
Article says:
```text
…xact_start < : 't0'…
```
What is true:
REL_18_6 pgstatfuncs.c:37 permits visibility through pg_read_all_stats or privileges of the session owner's role. Otherwise, lines 648-655 hide xact_start. The wait can miss those transactions. A lower identifier committed after the initial copy can escape both copy passes and disappear when the old table drops.
So what:
Run the transaction wait as a superuser or a role with pg_read_all_stats privileges. Verify visibility into application transactions before copying.
Review: E-15 also permits visibility through privileges of the session owner's role. The blanket statement about other roles excludes this exception. Unrelated application roles still support the missing-row scenario and data-loss consequence. We tested the same-role reading against separate application and migration roles. NULL transaction timestamps defeat the wait for unrelated roles. The article states no statistics-visibility prerequisite. The concrete privilege change prevents the identified row-loss path.

Sources:
- [REL_18_6 · src/backend/utils/adt/pgstatfuncs.c:37-37](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/pgstatfuncs.c#L37-L37)
  Excerpt:
  ```text
  #define HAS_PGSTAT_PERMISSIONS(role)	 (has_privs_of_role(GetUserId(), ROLE_PG_READ_ALL_STATS) || has_privs_of_role(GetUserId(), role))
  ```
- [REL_18_6 · src/backend/utils/adt/pgstatfuncs.c:494-498](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/pgstatfuncs.c#L494-L498)
  Excerpt:
  ```text
  if (beentry->st_xact_start_timestamp != 0 &&
				beentry->st_backendType != B_WAL_SENDER)
				values[8] = TimestampTzGetDatum(beentry->st_xact_start_timestamp);
  ```
- [REL_18_6 · src/backend/utils/adt/pgstatfuncs.c:648-655](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/pgstatfuncs.c#L648-L655)
  Excerpt:
  ```text
  {
			/* No permissions to view data about this session */
			values[5] = CStringGetTextDatum("<insufficient privilege>");
			nulls[4] = true;
			nulls[6] = true;
			nulls[7] = true;
			nulls[8] = true;
  ```
- [REL_19_STABLE@472da35ac0 · src/backend/utils/adt/pgstatfuncs.c:669-682](https://github.com/postgres/postgres/blob/472da35ac0e2ecf33419a7b6874fa5ba909a23d4/src/backend/utils/adt/pgstatfuncs.c#L669-L682)
  Qualification: Version note: The same visibility restriction exists in the pinned PostgreSQL 19 source.
  Excerpt:
  ```text
  /* No permissions to view data about this session */
			values[5] = CStringGetTextDatum("<insufficient privilege>");
			nulls[4] = true;
			nulls[6] = true;
			nulls[7] = true;
			nulls[8] = true;
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F1

### F2 · Misleading · Factual · Renaming a table does not expose readers through existing views
Location: excerpt · section “Finding out whether anyone still reads it” · as fetched 2026-11-03 · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=Any%20code%20path%20that%20still%20reads%20the%20table%20fails%20loudly)
Article says:
```text
Any code path that still reads the table fails loudly…
```
What is true:
Existing views continue reading a renamed table through its OID. REL_18_6 src/backend/rewrite/rewriteHandler.c:197 opens rte-\>relid. The rename changes pg_class.relname in tablecmds.c:4332-4334. A release without missing-table errors does not establish that every reader stopped.
So what:
Inspect pg_depend for views and other stored dependencies before treating a rename observation period as proof that the table is unused.
Charitable reading:
The rename exposes SQL that resolves the original table name directly. It does not expose every indirect reader.
Review: We tested the direct-name reading against the article's unrestricted claim. Views retain OID references. Checking pg_depend changes the retirement decision. We tested whether the rename claim covers only direct SQL. Its wording covers any code path. Stored views retain relation OIDs. Inspecting dependencies remains a concrete correction with a supported wasted-work consequence.

Sources:
- [REL_18_6 · src/backend/rewrite/rewriteHandler.c:197-197](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/rewrite/rewriteHandler.c#L197-L197)
  Excerpt:
  ```text
  rel = table_open(rte->relid, lockmode);
  ```
- [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);
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F2

### F3 · Misleading · Factual · Updates to old rows do not rule out partition retirement
Location: excerpt · section “When the table still has traffic” · as fetched 2026-11-03 · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=Partitioning%20does%20nothing%20for%20a,gets%20updates%20to%20old%20rows)
Article says:
```text
Partitioning does nothing for a table that gets updates to old rows…
```
What is true:
Updates do not prevent partition-based retention. REL_18_6 doc/src/sgml/ddl.sgml:3997-3999 permits bulk removal by partition. Lines 4102-4104 explicitly support updates across partition bounds. The retention predicate must cover the retired partition's rows.
So what:
Use partition retirement when every row in an expired partition qualifies for removal, even if those rows received updates.
Charitable reading:
Updates can make an age-based retention rule unsuitable. The article excludes tables merely because old rows receive updates.
Review: We considered updates that invalidate age-based retention. E-3 excludes updates categorically. The correction already requires every retired row to qualify. We tested the append-only context and age-based retention hypothesis. Updates alone do not invalidate partition retirement. The finding preserves the requirement that every retired row qualify for removal.

Sources:
- [REL_18_6 · doc/src/sgml/ddl.sgml:3997-3999](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ddl.sgml#L3997-L3999)
  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
  ```
- [REL_18_6 · doc/src/sgml/ddl.sgml:4102-4104](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ddl.sgml#L4102-L4104)
  Excerpt:
  ```text
  Updating the partition key of a row will cause it to be moved into a
    different partition if it no longer satisfies the partition bounds
    of its original partition.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F3

## Verified accurate claims (22)

### F4 · Accurate · Factual · A waiting DROP can block later reads and writes
Location: excerpt · section “Finding out whether anyone still reads it” · as fetched 2026-11-03 · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=PostgreSQL%20doesn%27t%20let%20later%20requests%20jump%20an%20exclusive%20waiter)
Article says:
```text
…PostgreSQL doesn't let later requests jump an exclusive waiter…
```
What is true:
DROP TABLE selects AccessExclusiveLock in REL_18_6 src/backend/commands/tablecmds.c:1553. That mode conflicts with reads and writes. src/backend/storage/lmgr/proc.c:1786-1792 checks earlier conflicting waiters before granting queued requests.
Charitable reading:
The claim describes fresh application requests in the displayed queue, rather than every lock-manager exception.
Review: We checked whether queue exceptions defeat the demonstrated fresh requests. Earlier conflicting waiters block those requests under E-23. We checked lock conflicts and waiter ordering. The finding correctly limits its conclusion to the described fresh requests.

Sources:
- [REL_18_6 · src/backend/storage/lmgr/proc.c:1786-1792](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/lmgr/proc.c#L1786-L1792)
  Excerpt:
  ```text
  /*
		 * Waken if (a) doesn't conflict with requests of earlier waiters, and
		 * (b) doesn't conflict with already-held locks.
		 */
		if ((lockMethodTable->conflictTab[lockmode] & aheadRequests) == 0 &&
			!LockCheckConflicts(lockMethodTable, lockmode, lock,
								proc->waitProcLock))
  ```
- [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 · src/backend/storage/lmgr/lock.c:99-103](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/lmgr/lock.c#L99-L103)
  Excerpt:
  ```text
  /* AccessExclusiveLock */
	LOCKBIT_ON(AccessShareLock) | LOCKBIT_ON(RowShareLock) |
	LOCKBIT_ON(RowExclusiveLock) | LOCKBIT_ON(ShareUpdateExclusiveLock) |
	LOCKBIT_ON(ShareLock) | LOCKBIT_ON(ShareRowExclusiveLock) |
	LOCKBIT_ON(ExclusiveLock) | LOCKBIT_ON(AccessExclusiveLock)
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F4

### F5 · Accurate · Factual · Dropping a foreign-key child can exclusively lock its referenced table
Location: excerpt · section “Finding out whether anyone still reads it” · as fetched 2026-11-03 · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=dropping%20the%20child%20takes%20AccessExclusiveLock%20on%20the%20parent)
Article says:
```text
…dropping the child takes AccessExclusiveLock on the parent…
```
What is true:
Foreign-key action triggers belong to the referenced relation. REL_18_6 src/backend/commands/tablecmds.c:13927-13948 creates them there. Removing a trigger opens its relation with AccessExclusiveLock in src/backend/commands/trigger.c:1323-1328.
Charitable reading:
The parent means the table referenced by the child's outgoing foreign key.
Review: We checked which relation owns the foreign-key action trigger. E-27 places it on the referenced relation. E-26 locks that relation exclusively. We checked which relation owns foreign-key action triggers. Removing those triggers exclusively locks the referenced relation.

Sources:
- [REL_18_6 · src/backend/commands/trigger.c:1323-1328](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/trigger.c#L1323-L1328)
  Excerpt:
  ```text
  /*
	 * Open and exclusive-lock the relation the trigger belongs to.
	 */
	relid = ((Form_pg_trigger) GETSTRUCT(tup))->tgrelid;

	rel = table_open(relid, AccessExclusiveLock);
  ```
- [REL_18_6 · src/backend/commands/tablecmds.c:13927-13948](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/tablecmds.c#L13927-L13948)
  Excerpt:
  ```text
  trigAddress = CreateTrigger(fk_trigger, NULL, refRelOid, myRelOid,
								constraintOid, indexOid, InvalidOid,
								parentDelTrigger, NULL, true, false);
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F5

### F6 · Accurate · Factual · Commit deletes relation files after releasing relation locks
Location: excerpt · section “What the replicas see” · as fetched 2026-11-03 · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=On%20the%20primary%20the%20backend,it%20has%20released%20its%20locks)
Article says:
```text
On the primary the backend unlinks them after it has released its locks…
```
What is true:
Primary commit schedules file deletion after releasing locks. REL_18_6 src/backend/access/transam/xact.c:2449-2453 states that ordering. Commit replay releases standby locks at line 6208 and deletes files at line 6239. Synchronous deletion delays subsequent replay.
Charitable reading:
The statement concerns commit-time deletion of ordinary relation storage.
Review: We checked commit ordering and the deferred first-segment exception. Lock release precedes pending deletion. E-31 preserves the checkpoint qualification. We checked primary cleanup ordering and standby replay ordering. Both release relation locks before file deletion. The finding does not claim immediate primary deletion of every segment.

Sources:
- [REL_18_6 · src/backend/access/transam/xact.c:2435-2453](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xact.c#L2435-L2453)
  Excerpt:
  ```text
  * this may take many seconds, also delay until after releasing locks.
	 * Other backends will observe the attendant catalog changes and not
	 * attempt to access affected files.
	 */
	smgrDoPendingDeletes(true);
  ```
- [REL_18_6 · src/backend/access/transam/xact.c:6208-6208](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xact.c#L6208-L6208)
  Excerpt:
  ```text
  StandbyReleaseLockTree(xid, parsed->nsubxacts, parsed->subxacts);
  ```
- [REL_18_6 · src/backend/access/transam/xact.c:6239-6239](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xact.c#L6239-L6239)
  Excerpt:
  ```text
  DropRelationFiles(parsed->xlocators, parsed->nrels, true);
  ```
- [REL_18_6 · src/backend/storage/smgr/md.c:274-277](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/smgr/md.c#L274-L277)
  Excerpt:
  ```text
  * For regular relations, we don't unlink the first segment file of the rel,
 * but just truncate it to zero length, and record a request to unlink it after
 * the next checkpoint.  Additional segments can be unlinked immediately,
 * however.  Leaving the empty file in place prevents that relfilenumber
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F6

### F7 · Accurate · Factual · Standby feedback does not prevent DROP relation-lock conflicts
Location: excerpt · section “What the replicas see” · as fetched 2026-11-03 · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=hot_standby_feedback%20doesn%27t%20help%2C%20because%20it%27s,row%20versions%20and%20not%20locks)
Article says:
```text
hot_standby_feedback doesn't help, because it's about row versions and not locks…
```
What is true:
Recovery acquires AccessExclusiveLock in REL_18_6 src/backend/storage/ipc/standby.c:1027. Feedback prevents cleanup conflicts, not that lock conflict. doc/src/sgml/config.sgml:5158 sets the streaming-delay default to 30 seconds. That allowance covers received WAL, rather than granting every query 30 seconds.
Charitable reading:
The article distinguishes row-version cleanup conflicts from relation-lock conflicts.
Review: We tested whether feedback addresses the replay lock. E-33 addresses cleanup conflicts. E-32 independently acquires AccessExclusiveLock. We checked feedback scope and the streaming-delay documentation. Feedback addresses cleanup conflicts. Recovery still acquires the conflicting relation lock. The finding correctly qualifies the 30-second allowance.

Sources:
- [REL_18_6 · src/backend/storage/ipc/standby.c:1025-1027](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/ipc/standby.c#L1025-L1027)
  Excerpt:
  ```text
  SET_LOCKTAG_RELATION(locktag, dbOid, relOid);

		(void) LockAcquire(&locktag, AccessExclusiveLock, true, false);
  ```
- [REL_18_6 · doc/src/sgml/config.sgml:5234-5254](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L5234-L5254)
  Excerpt:
  ```text
  be used to eliminate query cancels caused by cleanup records, but
        can cause database bloat on the primary for some workloads.
  ```
- [REL_18_6 · doc/src/sgml/config.sgml:5158-5158](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L5158-L5158)
  Excerpt:
  ```text
  The default is 30 seconds.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F7

### F8 · Accurate · Factual · The batching procedure commits separate transactions
Location: excerpt · section “Deleting in batches” · as fetched 2026-11-03 · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=Each%20COMMIT%20ends%20a%20real%20transaction%2C%20not%20a%20subtransaction.)
Article says:
```text
…Each COMMIT ends a real transaction, not a subtransaction.
```
What is true:
Procedure COMMIT ends the current transaction and starts another automatically. REL_18_6 doc/src/sgml/plpgsql.sgml:3704-3718 documents this behavior. Exception blocks form subtransactions. ref/call.sgml:95-98 forbids procedure transaction control when CALL runs inside an explicit transaction block.
Charitable reading:
The procedure runs through a top-level CALL outside an explicit transaction block, as the article requires.
Review: We checked explicit transaction blocks and exception handlers as counterexamples. The article requires a top-level CALL outside a transaction block. We checked top-level CALL and exception-block restrictions. The article states both prerequisites. This finding verifies transaction semantics without certifying execution of the complete recipe.

Sources:
- [REL_18_6 · doc/src/sgml/plpgsql.sgml:3704-3718](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/plpgsql.sgml#L3704-L3718)
  Excerpt:
  ```text
  it is possible to end transactions using the
    commands <command>COMMIT</command> and <command>ROLLBACK</command>.  A new
    transaction is started automatically after a transaction is ended using
    these commands, so there is no separate <command>START
    TRANSACTION</command> command.
  ```
- [REL_18_6 · doc/src/sgml/plpgsql.sgml:3751-3778](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/plpgsql.sgml#L3751-L3778)
  Excerpt:
  ```text
  Under the hood, a block with exception handlers forms a
    subtransaction, which means that transactions cannot be ended inside
    such a block.
  ```
- [REL_18_6 · doc/src/sgml/ref/call.sgml:95-98](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/call.sgml#L95-L98)
  Excerpt:
  ```text
  If <command>CALL</command> is executed in a transaction block, then the
   called procedure cannot execute transaction control statements.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F8

### F9 · Accurate · Factual · DELETE leaves index-tuple removal to vacuum
Location: excerpt · section “Deleting in batches” · as fetched 2026-11-03 · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=A%20DELETE%20doesn%27t%20touch%20the%20indexes.)
Article says:
```text
A DELETE doesn't touch the indexes.
```
What is true:
DELETE does not immediately remove index tuples because other transactions may still need them. REL_18_6 src/backend/executor/nodeModifyTable.c:1804-1810 documents this behavior. Ordinary vacuum can truncate empty trailing pages, as src/backend/access/heap/vacuumlazy.c:3221 states.
Charitable reading:
The sentence means DELETE leaves index-tuple removal to vacuum. Its scan can read indexes and change hints.
Review: We considered index reads and hint changes during DELETE. The finding expressly limits its conclusion to deferred index-tuple removal. We tested the literal index-access reading. The finding already narrows the claim to index-tuple removal. Its distinction between deletion and vacuum matches the source.

Sources:
- [REL_18_6 · src/backend/executor/nodeModifyTable.c:1804-1810](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/executor/nodeModifyTable.c#L1804-L1810)
  Excerpt:
  ```text
  * Note: Normally one would think that we have to delete index tuples
		 * associated with the heap tuple now...
		 *
		 * ... but in POSTGRES, we have no need to do this because VACUUM will
		 * 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/heap/vacuumlazy.c:3221-3221](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/heap/vacuumlazy.c#L3221-L3221)
  Excerpt:
  ```text
  * lazy_truncate_heap - try to truncate off any empty pages at the end
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F9

### F10 · Accurate · Factual · Checksums and wal_log_hints enable post-checkpoint hint images
Location: excerpt · section “The first SELECT after the delete” · as fetched 2026-11-03 · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=wal_log_hints%20%3D%20on%20has%20the%20same%20effect%20without%20checksums.)
Article says:
```text
wal_log_hints = on has the same effect without checksums.
```
What is true:
REL_18_6 src/include/access/xlog.h:120 enables hint protection for checksums or wal_log_hints. src/backend/storage/buffer/bufmgr.c:5493-5504 explains the first-post-checkpoint image. Disabling both removes those hint images without disabling pruning WAL.
Charitable reading:
The claim compares hint-image generation under the demonstrated checksum and WAL settings, rather than promising identical total WAL.
Review: We checked whether identical hint protection implies identical total WAL. The finding limits equivalence to hint images under the demonstrated settings. We checked the hint-protection predicate and checkpoint condition. The finding verifies hint-image behavior and excludes the displayed byte totals.

Sources:
- [REL_18_6 · src/include/access/xlog.h:120-120](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/access/xlog.h#L120-L120)
  Excerpt:
  ```text
  #define XLogHintBitIsNeeded() (DataChecksumsEnabled() || wal_log_hints)
  ```
- [REL_18_6 · src/backend/storage/buffer/bufmgr.c:5493-5508](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/buffer/bufmgr.c#L5493-L5508)
  Excerpt:
  ```text
  * If we need to protect hint bit updates from torn writes, WAL-log a
		 * full page image of the page. This full page image is only necessary
		 * if the hint bit update is the first change to the page since the
		 * last checkpoint.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F10

### F11 · Accurate · Factual · Foreign-key creation and validation use the stated lock modes
Location: excerpt · section “Copying the keepers instead” · as fetched 2026-11-03 · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=VALIDATE%20CONSTRAINT%20only%20needs%20SHARE,ROW%20SHARE%20on%20the%20parent.)
Article says:
```text
…VALIDATE CONSTRAINT only needs SHARE UPDATE EXCLUSIVE on the child and ROW SHARE on the parent.
```
What is true:
Foreign-key creation opens the referenced table with ShareRowExclusiveLock in REL_18_6 src/backend/commands/tablecmds.c:10105-10111. Validation uses SHARE UPDATE EXCLUSIVE on the child and ROW SHARE on the referenced table. doc/src/sgml/ref/alter_table.sgml:1502-1529 documents those modes.
Charitable reading:
The quoted modes describe validation of a foreign key on an ordinary table.
Review: We checked creation separately from validation. E-42 and E-43 support the distinct referenced-table lock modes. We checked creation separately from validation. The source supports ShareRowExclusiveLock during creation and the lighter documented validation locks.

Sources:
- [REL_18_6 · src/backend/commands/tablecmds.c:10099-10116](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/tablecmds.c#L10099-L10116)
  Excerpt:
  ```text
  if (OidIsValid(fkconstraint->old_pktable_oid))
		pkrel = table_open(fkconstraint->old_pktable_oid, ShareRowExclusiveLock);
	else
		pkrel = table_openrv(fkconstraint->pktable, ShareRowExclusiveLock);
  ```
- [REL_18_6 · doc/src/sgml/ref/alter_table.sgml:1502-1529](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/alter_table.sgml#L1502-L1529)
  Excerpt:
  ```text
  a <literal>SHARE UPDATE EXCLUSIVE</literal> lock on the table being
    altered.  (If the constraint is a foreign key then a <literal>ROW
    SHARE</literal> lock is also required on the table referenced by the
    constraint.)
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F11

### F12 · Accurate · Factual · PostgreSQL 19 concurrent REPACK uses logical decoding without a WHERE clause
Location: excerpt · section “Copying the keepers instead” · as fetched 2026-11-03 · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=REPACK%20%28CONCURRENTLY%29%20in%20PostgreSQL%2019,but%20has%20no%20WHERE%20clause.)
Article says:
```text
REPACK (CONCURRENTLY) in PostgreSQL 19 does it with logical decoding but has no WHERE clause.
```
What is true:
The pinned PostgreSQL 19 implementation creates a logical decoding context in src/backend/commands/repack_worker.c:271-287. doc/src/sgml/ref/repack.sgml:24-35 lists the command syntax without WHERE. The parser's RepackStmt productions likewise omit row filtering.
Charitable reading:
The article explicitly assigns this feature to PostgreSQL 19, rather than its PostgreSQL 18.6 experiments.
Review: We checked for confusion with PostgreSQL 18.6. E-12 explicitly names PostgreSQL 19. Its implementation and documented syntax support the conclusion. We checked whether PostgreSQL 18 evidence had been applied to PostgreSQL 19. The citations use the correct PostgreSQL 19 pin. They show logical decoding and command syntax without WHERE.

Sources:
- [REL_19_STABLE@472da35ac0 · src/backend/commands/repack_worker.c:271-287](https://github.com/postgres/postgres/blob/472da35ac0e2ecf33419a7b6874fa5ba909a23d4/src/backend/commands/repack_worker.c#L271-L287)
  Excerpt:
  ```text
  ctx = CreateInitDecodingContext(PGREPACK_PLUGIN,
  ```
- [REL_19_STABLE@472da35ac0 · doc/src/sgml/ref/repack.sgml:24-35](https://github.com/postgres/postgres/blob/472da35ac0e2ecf33419a7b6874fa5ba909a23d4/doc/src/sgml/ref/repack.sgml#L24-L35)
  Excerpt:
  ```text
  REPACK [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ] [ <replaceable class="parameter">table_and_columns</replaceable> [ USING INDEX [ <replaceable class="parameter">index_name</replaceable> ] ] ]
REPACK [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ] USING INDEX
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F12

### F13 · Accurate · Factual · PostgreSQL 18 initdb enables checksums by default
Location: Article · exact quote · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=data%20checksums%20on%20%28the%2018%20default%29)
Article says:
```text
…data checksums on (the 18 default)…
```
What is true:
Both REL_18_0 and REL_18_6 initialize data_checksums to true in src/bin/initdb/initdb.c:167. The article correctly describes the initialization default.
Charitable reading:
The default applies to newly initialized PostgreSQL 18 clusters. Upgraded clusters can retain their prior checksum state.
Review: We considered upgraded clusters as a counterexample. The finding correctly restricts the default to initialization and checks both 18.0 and 18.6. We checked PostgreSQL 18.0 and 18.6. Both initialization defaults enable checksums. The finding correctly limits the claim to initialization.

Sources:
- [REL_18_0 · src/bin/initdb/initdb.c:167-167](https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/src/bin/initdb/initdb.c#L167-L167)
  Qualification: Version note: Checks the article's PostgreSQL 18 version floor.
  Excerpt:
  ```text
  static bool data_checksums = true;
  ```
- [REL_18_6 · src/bin/initdb/initdb.c:167-167](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/bin/initdb/initdb.c#L167-L167)
  Excerpt:
  ```text
  static bool data_checksums = true;
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F13

### F14 · Accurate · Factual · Direct table-name lookup retries after a concurrent rename
Location: Article · exact quote · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=Queries%20blocked%20on%20the%20lock,name%20again%20once%20it%27s%20granted)
Article says:
```text
Queries blocked on the lock resolve the table name again once it's granted…
```
What is true:
RangeVarGetRelidExtended repeats name lookup after relevant invalidations during lock acquisition. REL_18_6 src/backend/catalog/namespace.c:616-623 states this behavior. The demonstrated direct-name queries can consequently resolve the replacement table after the swap.
Charitable reading:
The statement concerns the demonstrated direct-name queries waiting during relation-name resolution. Existing views retain OID references, as A2 explains.
Review: We considered stored OID references as a counterexample. The finding limits its conclusion to direct-name lookup after relevant invalidations. We checked lookup retry conditions after lock acquisition. Relevant invalidations trigger another lookup. The finding limits its conclusion to direct-name queries and excludes measured timings.

Sources:
- [REL_18_6 · src/backend/catalog/namespace.c:616-623](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/namespace.c#L616-L623)
  Excerpt:
  ```text
  /*
		 * Something may have changed.  Let's repeat the name lookup, to make
		 * sure this name still references the same relation it did
		 * previously.
		 */
		retry = true;
		oldRelId = relId;
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F14

### F15 · Accurate · Factual · GitLab documents with_lock_retries
Location: excerpt · section “Finding out whether anyone still reads it” · as fetched 2026-11-03 · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=their%20migration%20framework%20wraps%20DDL%20in%20with_lock_retries)
Article says:
```text
…their migration framework wraps DDL in with_lock_retries…
```
What is true:
GitLab's migration guide documents with_lock_retries for controlling lock acquisition retries and timeouts. The article correctly identifies the helper.
Charitable reading:
The sentence identifies an available migration helper rather than promising identical behavior for every migration.
Review: We checked whether the finding certifies every migration path. It only verifies the documented with_lock_retries helper. We checked whether documentation establishes implementation behavior. The finding only confirms the documented helper and its purpose.

Sources:
- [https://docs.gitlab.com/development/migration_style_guide/](https://docs.gitlab.com/development/migration_style_guide/)
  Excerpt:
  ```text
  with_lock_retries method enables explicit control over lock
acquisition retries and timeout configuration
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F15

### F16 · Accurate · Factual · GitLab recommends separate foreign-key removal migrations
Location: excerpt · section “Finding out whether anyone still reads it” · as fetched 2026-11-03 · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=each%20foreign%20key%20goes%20in%20its%20own%20migration%20first.)
Article says:
```text
…each foreign key goes in its own migration first.
```
What is true:
GitLab's migration guide says to drop each foreign key in a separate migration to avoid lock contention. The article accurately repeats that recommendation.
Charitable reading:
The instruction applies to dropping a table with multiple outgoing foreign keys.
Review: We checked the migration recommendation against E-52. The guide explicitly calls for separate foreign-key removal migrations. We checked the recommendation's scope. GitLab explicitly recommends separate migrations for individual foreign keys.

Sources:
- [https://docs.gitlab.com/development/migration_style_guide/](https://docs.gitlab.com/development/migration_style_guide/)
  Excerpt:
  ```text
  you must drop each key in a separate migration to avoid lock contention.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F16

### F17 · Accurate · Factual · The 60-second and 8 MB defaults match GitLab documentation
Location: Article · exact quote · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=max_replication_lag_time%20behind%20%2860%20seconds%20by%20default%29.%20max_replication_difference%20%288%20MB%29)
Article says:
```text
…max_replication_lag_time behind (60 seconds by default). max_replication_difference (8 MB)…
```
What is true:
GitLab documents max_replication_lag_time as 60 seconds and max_replication_difference as 8 MB. The article reports both defaults correctly.
Charitable reading:
The article describes documented defaults, not the customer's actual configuration.
Review: We checked whether documented defaults establish production settings. The finding claims only the documented 60-second and 8 MB defaults. We tested whether defaults had been presented as production configuration. The finding makes no such claim. Both documented defaults match.

Sources:
- [https://docs.gitlab.com/administration/postgresql/database_load_balancing/](https://docs.gitlab.com/administration/postgresql/database_load_balancing/)
  Excerpt:
  ```text
  max_replication_difference The amount of data (in bytes) a secondary is allowed to lag behind when it has not replicated data recently. 8 MB max_replication_lag_time The maximum number of seconds a secondary is allowed to lag behind before it is skipped. 60 seconds
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F17

### F18 · Accurate · Factual · The earlier DELETE post makes the attributed batching recommendation
Location: Article · exact quote · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=batching%20slower%20than%20one%20big,it%20for%20the%20breathing%20room)
Article says:
```text
…batching slower than one big DELETE and worth it for the breathing room…
```
What is true:
The earlier DELETE post says batches may take longer than one DELETE. It recommends batching so PostgreSQL can handle other workloads. The article faithfully summarizes that advice.
Charitable reading:
The sentence summarizes the earlier post's recommendation rather than establishing a universal performance result.
Review: We checked the earlier post's conditional performance wording. The finding preserves that qualification and verifies attribution rather than throughput. We checked the earlier post's conditional wording. The finding preserves that qualification by saying batches may take longer.

Sources:
- [https://boringsql.com/posts/deletes-are-difficult/](https://boringsql.com/posts/deletes-are-difficult/)
  Excerpt:
  ```text
  Will this method be faster than performing one massive DELETE? Likely not, especially if you include a wait time between batches to allow PostgreSQL to handle other workloads.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F18

### F19 · Accurate · Factual · GitLab's swapping guide contains the ID 1 warning
Location: Article · exact quote · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=with%20a%20warning%20that%20new,otherwise%20start%20at%20id%201.)
Article says:
```text
…with a warning that new rows would otherwise start at id 1.
```
What is true:
GitLab's swapping guide warns that failing to reset the primary-key sequence starts new IDs at 1. The article attributes that warning correctly.
Charitable reading:
The sentence attributes the ID 1 warning to GitLab's guide.
Review: We considered nondefault sequence starts. The finding verifies the guide's ID 1 warning without generalizing across sequence configurations. We tested the warning against custom sequence configurations. The finding verifies attribution to GitLab's guide without generalizing the warning.

Sources:
- [https://docs.gitlab.com/development/database/swapping_tables/](https://docs.gitlab.com/development/database/swapping_tables/)
  Excerpt:
  ```text
  Failure to reset the primary keys results in newly created rows starting
with an ID value of 1.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F19

### F20 · Accurate · Factual · GitLab's postmortem confirms deletion occurred on the primary
Location: Article · exact quote · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=It%20was%20on%20the%20primary.)
Article says:
```text
It was on the primary.
```
What is true:
GitLab's January 31, 2017 postmortem says an engineer intended to clear the secondary's database directory. The engineer instead executed the deletion on the primary.
Charitable reading:
The introduction summarizes GitLab's published incident account.
Review: We checked the primary-versus-secondary attribution. E-60 explicitly confirms execution on the primary. We checked the primary-versus-secondary distinction against the first-party postmortem. The account supports the finding.

Sources:
- [https://about.gitlab.com/blog/postmortem-of-database-outage-of-january-31/](https://about.gitlab.com/blog/postmortem-of-database-outage-of-january-31/)
  Excerpt:
  ```text
  Unfortunately this process was executed on the primary instead.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F20

### F21 · Accurate · Factual · Both displayed WAL combined-size columns add correctly
Location: excerpt · section “The first SELECT after the delete” · as fetched 2026-11-03 · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=XLOG%2FFPI_FOR_HINT%20959025%2046992220%207688857048%207735849268)
Article says:
```text
…XLOG/FPI_FOR_HINT     959025       46992220      7688857048       7735849268…
```
What is true:
Both displayed WAL rows add correctly. The hint row totals 7.20 GiB. The prune row totals 93.6 MiB. This checks arithmetic, not the underlying measurements.
Charitable reading:
The table identifies an earlier run. We checked its column arithmetic independently of later runs.
Explanation: Checked for internal consistency: the evidence is the article itself.
Review: We recalculated both byte sums and binary conversions. Both combined-size totals match. The finding does not authenticate measurements. We recomputed both sums and binary-unit conversions. Both totals match. The finding expressly excludes verification of the measurements.

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F21

### F22 · Accurate · Factual · The 256 GiB timings imply a 112-times speedup
Location: excerpt · section “What the replicas see” · as fetched 2026-11-03 · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=XFS%20was%20over%20a%20hundred%20times%20faster%20at%20both%20sizes.)
Article says:
```text
…XFS was over a hundred times faster at both sizes.
```
What is true:
The displayed 256 GiB timings imply a 112-times speedup (derived: 4.38 seconds / 0.039 seconds). This exceeds 100 times.
Charitable reading:
The speedup compares the two displayed timings for the same 256 GiB table size.
Explanation: Checked for internal consistency: the evidence is the article itself.
Review: We converted milliseconds before dividing. The displayed ratios are 112 times at 256 GiB and 201 times at 1 TiB. We recomputed both displayed ratios after converting milliseconds. They yield approximately 112 and 201 times. The finding's 256 GiB calculation holds.

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F22

### F23 · Accurate · Factual · The 4 TiB ext4 projection rounds correctly to 70 seconds
Location: Article · exact quote · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=At%20the%2016%20to%2018,ext4%20that%27s%20about%2070%20seconds.)
Article says:
```text
At the 16 to 18 ms each I saw on fragmented ext4 that's about 70 seconds.
```
What is true:
Four TiB contains about 4,100 one-GiB segments. The stated rate projects 65.5–73.7 seconds. About 70 seconds follows from those inputs.
Charitable reading:
The introduction defines binary size units. The 70-second estimate explicitly extrapolates a measured per-segment rate.
Explanation: Checked for internal consistency: the evidence is the article itself.
Review: We checked binary units and multiplied 4,096 segments by 16–18 milliseconds. The resulting 65.5–73.7 seconds supports the stated projection. We tested decimal versus binary units. The article defines binary sizes. Multiplying 4,096 segments by 16–18 milliseconds gives 65.5–73.7 seconds.

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F23

### F24 · Accurate · Factual · The keeper copy uses 10.8% of displayed batch-delete WAL
Location: excerpt · section “Copying the keepers instead” · as fetched 2026-11-03 · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=2803416%20%7C%208155%20%7C%20882%20MB)
Article says:
```text
…2803416 |    8155 | 882 MB…
```
What is true:
The displayed keeper-copy WAL is 10.8% of batch-delete WAL (derived: 882 MiB / 8,179 MiB). About one tenth is a valid approximation.
Charitable reading:
The comparison uses laptop results and excludes subsequent vacuum WAL, as the article states.
Explanation: Checked for internal consistency: the evidence is the article itself.
Review: We checked the denominator and matching units. The keeper copy uses 10.8% of displayed batch-delete WAL before vacuum. We checked matching populations and units. Both numbers describe laptop WAL before subsequent vacuum. Their ratio rounds to 10.8%.

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F24

### F25 · Accurate · Factual · The stated 30-second wait is below GitLab's 60-second default
Location: Article · exact quote · [open in article](https://boringsql.com/posts/delete-4tb#:~:text=with%20the%20default%2030%20seconds,alone%20stays%20under%20their%2060)
Article says:
```text
…with the default 30 seconds the lock wait alone stays under their 60…
```
What is true:
GitLab documents a 60-second default for max_replication_lag_time. The article's stated 30-second wait is below that threshold.
Charitable reading:
The sentence explicitly assumes default settings. It does not claim the actual GitLab deployment uses them.
Review: We tested whether the finding promises replica eligibility despite other lag. It only compares the stated 30-second wait with 60 seconds. We tested whether the comparison guarantees actual replica eligibility. The finding only compares stated defaults. Thirty seconds remains below the documented 60-second threshold.

Sources:
- [https://docs.gitlab.com/administration/postgresql/database_load_balancing/](https://docs.gitlab.com/administration/postgresql/database_load_balancing/)
  Excerpt:
  ```text
  max_replication_lag_time The maximum number of seconds a secondary is allowed to lag behind before it is skipped. 60 seconds
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a#F25

## Notes (not graded) (0)

None.

## Withdrawn findings (0)

None.

## Section checks

- Introduction · A · 2 verified-accurate · 100% of claims (4 of 4, plus 13 that need data we do not have)
- Drop costs · A · 1 verified-accurate · 88% of claims (8 of 9, plus 7 that need data we do not have)
- Readers and locks · B+ · 1 misleading · 4 verified-accurate · 88% of claims (15 of 17, plus 3 that need data we do not have)
- Replica effects · A · 4 verified-accurate · 87% of claims (21 of 24, plus 48 that need data we do not have)
- Active tables · B+ · 1 misleading · 100% of claims (7 of 7, plus 1 that need data we do not have)
- Batch deletes · A · 3 verified-accurate · 95% of claims (21 of 22, plus 17 that need data we do not have)
- First read · A · 2 verified-accurate · 83% of claims (10 of 12, plus 18 that need data we do not have)
- Copy and swap · D · 1 dangerous-recipe · 5 verified-accurate · 96% of claims (52 of 54, plus 9 that need data we do not have)
- 4 TB recommendation · A · 1 verified-accurate · 83% of claims (10 of 12, plus 5 that need data we do not have)

## Claim coverage

- Introduction: 4 of 4 Postgres claims checked, plus 13 that need data we do not have; not counted: 3 product or opinion, 2 not a claim
- Test table: 14 of 15 Postgres claims checked, plus 2 that need data we do not have; not counted: 1 not a claim; not checked: 1 for other reasons
- Drop costs: 8 of 9 Postgres claims checked, plus 7 that need data we do not have; not counted: 1 not a claim; not checked: 1 for other reasons
- Readers and locks: 15 of 17 Postgres claims checked, plus 3 that need data we do not have; not counted: 1 product or opinion, 1 not a claim; not checked: 2 for other reasons
- Replica effects: 21 of 24 Postgres claims checked, plus 48 that need data we do not have; not counted: 3 product or opinion, 2 not a claim; not checked: 3 for other reasons
- Active tables: 7 of 7 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 product or opinion, 1 duplicate, 1 not a claim
- Batch deletes: 21 of 22 Postgres claims checked, plus 17 that need data we do not have; not counted: 1 not a claim; not checked: 1 for other reasons
- First read: 10 of 12 Postgres claims checked, plus 18 that need data we do not have; not counted: 1 not a claim; not checked: 2 for other reasons
- Copy and swap: 52 of 54 Postgres claims checked, plus 9 that need data we do not have; not counted: 1 product or opinion, 1 not a claim; not checked: 2 for other reasons
- 4 TB recommendation: 10 of 12 Postgres claims checked, plus 5 that need data we do not have; not counted: 1 product or opinion, 3 duplicate, 3 not a claim; not checked: 2 for other reasons
- Changelog and footer: 1 claim is the author's own account; nothing checkable; not counted: 1 product or opinion, 2 duplicate, 4 not a claim

## What we did not check

- We did not reproduce the displayed measurements or verify the reported hardware and filesystem configurations.
- We did not check the Linux, ext4, XFS, ZFS, or vmtouch implementations.
- We did not check pg_repack's trigger implementation.
- We did not execute the SQL and psql recipes or validate their runtime dependencies.
- We did not verify PostgreSQL 18.6 availability, PostgreSQL 19 release status, or PostgreSQL 19 REPACK support.
- We did not reproduce the article's measurements or verify its experiment settings and deployment records.
- We did not independently check the ext4, XFS, ZFS, vmtouch, or hardware claims.
- We did not check PostgreSQL source code for the locking, WAL, vacuum, partitioning, or table-swap claims.
- We did not check the SQL recipes' syntax, setup, dependencies, permissions, function bodies, or runtime effects.
- We did not establish historical documentation changes between publication and November 3, 2026.
- We did not independently verify the hardware descriptions, customer deployment, or displayed timing and WAL measurements.
- We did not verify the 137-byte image average or the number of heap pages the delete touched.
- We did not check the SQL recipes against PostgreSQL 18.6 or execute their setup and transaction steps.
- We did not check the WAL and filesystem explanations against PostgreSQL or filesystem source.
- We could not establish the cache contribution on GitLab's replicas without their RAM and residency measurements.
- reproducibility: benchmark check did not finish
- 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.
- experiments: check did not finish
- production actions: check did not finish
- benchmark: check did not finish
- No code blocks were checked for syntax.
- 12 blocks were not checked for syntax.
- Code blocks 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 were 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

- D+ — the findings address the article's main subject. What we did not check is listed below. The findings directly check DROP locking, replay ordering, deletion WAL, copy-and-swap correctness, and the 4 TiB projection arithmetic.
- 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.26 · worst of factual, consistent, safe: D · result D+
- 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_19_STABLE@472da35ac0 at commit 472da35ac0e2ecf33419a7b6874fa5ba909a23d4 (pinned target); https://about.gitlab.com/blog/postmortem-of-database-outage-of-january-31/ (fetched 2026-11-03T02:12:25.127443Z); https://boringsql.com/changelog/ (fetched 2026-11-03T02:12:35.131018Z); https://boringsql.com/posts/deletes-are-difficult/ (fetched 2026-11-03T02:12:32.100204Z); https://boringsql.com/posts/files-forks-and-relfilenodes/ (fetched 2026-11-03T02:12:27.108273Z); https://boringsql.com/posts/tablesample/ (fetched 2026-11-03T02:12:42.542092Z); https://boringsql.com/tags/expert/ (fetched 2026-11-03T02:12:40.583886Z); https://boringsql.com/tags/maintenance/ (fetched 2026-11-03T02:12:38.795805Z); https://boringsql.com/tags/postgresql/ (fetched 2026-11-03T02:12:36.911727Z); https://docs.gitlab.com/administration/postgresql/database_load_balancing/ (fetched 2026-11-03T02:12:30.263787Z); https://docs.gitlab.com/development/database/swapping_tables/ (fetched 2026-11-03T02:12:33.315425Z); https://docs.gitlab.com/development/migration_style_guide/ (fetched 2026-11-03T02:12:29.010451Z).
- Article captured 2026-11-03T02:12:10.640711Z · SHA-256 3c177c75badfd674db4d856945cdc3e033687ba037a2b36afd26dac7d8dd4323 · Text extracted from the article's HTML.
- Policy SHA-256 72826fdaa31b16300aa0c840e58af4d8fe12441be60f12fe0d643d538165e731 · Grading rules SHA-256 6fb334e79d6b9e7ed81d3238cc10d9de602ff87ed65ff2fa781f53bac5798765.
- We did not reproduce the displayed timings, WAL volumes, or replica lag measurements.
- We did not verify the hardware, filesystem configurations, customer deployment, or actual load-balancing settings.
- We did not check Linux, ext4, XFS, ZFS, vmtouch, or pg_repack implementations.
- We did not execute the SQL or psql recipes or validate their setup, dependencies, permissions, and runtime effects. No code block received a syntax check.
- We did not verify PostgreSQL 18.6 availability or PostgreSQL 19 release-candidate status.
- We did not independently verify the reported 137-byte image average or the number of heap pages touched.
- GitLab's replica RAM and cache residency remain unknown, so we could not establish its cache-related deletion cost.
- The article lists October 31, 2026 without a publication time. We use midnight UTC.
- We did not establish historical documentation changes between publication and November 3, 2026.
- article target version: bound to the most-cited major; also named 18 (2×)
- review: the findings were written by one model and reviewed independently by a different model.
- 12 passages in this edition fell short of our own plain-English rules.
- Built from the article text captured above, one pinned source tree, and 11 fetched pages.
- 24 survived · 1 weakened · 0 withdrawn.

## Edition changes

- F1 · weakened.
- F2 · 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.
- F21 · recalibrated.
- F22 · recalibrated.
- F23 · recalibrated.
- F24 · recalibrated.
- F25 · recalibrated.

## Revision history

- [Revision 1](https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a?v=2) · 2026-11-01 14:26 UTC · D+ · audited with v1.1.4
  Article as first submitted. 24 accurate · 1 wrong · 0 caveats.
  ElephantSeal: D+. Open: the production risk is not yet fixed or warned about.
  Changes: First audit. Open: F20 “Updates do not eliminate partition-based retention” (misleading).
- [Revision 2](https://pgtrue.postgres.ai/shared/brief/14239f4f-56d6-4aae-8687-b72cdf6ba01a?v=4) · this page · 2026-11-03 02:12 UTC · D+ · audited with v1.1.5
  Same article text, re-audited. 22 accurate · 3 wrong · 0 caveats.
  ElephantSeal: D+. Open: the production risk is not yet fixed or warned about; central claim not checked.
  Changes: No longer reported: none. New: F1 “…xact_start \< : 't0'…” (dangerous); F2 “Renaming a table does not expose readers through existing views” (misleading).

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