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 BLimited coverageOpen: the benchmark cannot yet be rerun from what is published

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/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75)
<a href="https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75"><img src="https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75.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/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75)
<a href="https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75"><img src="https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75.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/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75)
<a href="https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75"><img src="https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75.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/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/radar.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75)
<a href="https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75"><img src="https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/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/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/radar.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/radar.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/radar.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75)
<a href="https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75"><img src="https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/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/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/radar.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/radar.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/radar.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75)
<a href="https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75"><img src="https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/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/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/radar.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/radar.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/wide.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75)
<a href="https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75"><img src="https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/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/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/wide.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/wide.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75
   :alt: pgTrue fact-check
   :width: 480
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/wide.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75)
<a href="https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75"><img src="https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/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/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/wide.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/wide.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75
   :alt: pgTrue fact-check
   :width: 480
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/wide.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75)
<a href="https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75"><img src="https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/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/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/wide.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75/wide.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75
   :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

Resolve Amazon Aurora PostgreSQL lock contention with Database Insights: Part 2 | Amazon Web Services (opens in new tab)

aws.amazon.com
Check before you follow it: 1 claim is wrong.
1
inaccuracy
0
dangerous-recipe
0
misleading
4
imprecise
0
transcription
0
aged
0
withdrawn
17
verified-accurate

Central claim not verified: diagnosing lock contention with Database Insights and reducing it through transaction changes and inventory striping. We could not verify this, and the article gives no method to reproduce it.

Factual B+ · Applicable A · Consistent A · Transparent C · Safe —

ReportTechnical fact-check, edition 3 pgTrue versionaudited with v1.0.17 (approx.) · regraded with v1.1.3 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 2 times; see Revisions below. Policy: right-of-reply and corrections policy.

Inaccuracies

F3

Backend signaling does not always require rds_superuser

INACCURATEFactual · holds up after review

Claim ledger

Article says
…Both functions require rds_superuser privileges…
What is true
The cited service documentation permits signaling another session owned by the same database user. It also permits members of pg_signal_backend. Requiring rds_superuser for every cancellation or termination overstates the privilege requirement.
So what
Cancel or terminate the application's own sessions using the same database role. Use pg_signal_backend privileges for permitted cross-role signaling.
Charitable reading
rds_superuser is sufficient for many administrative operations. The article says it is required for both functions.

Source

Source · https://repost.aws/knowledge-center/rds-cancel-long-running-queriesYou're an rds_superuser or a member of the default role pg_signal_backend . You're connected to the database as the same database user of the session that you want to cancel.
In the article · section “Immediate resolution – Query termination”

In the article

excerpt · section “Immediate resolution – Query termination” · as fetched 2026-10-21 · open in article ↗ (opens in new tab)

Immediate resolution – Query termination

Both functions require rds_superuser privileges and use the process ID from pg_stat_activity.pid , which is also available in the Lock Tree view in Database Insights’ Lock Analysis tab.

All sources and excerpts · 1
EvidenceYou're an rds_superuser or a member of the default role pg_signal_backend . You're connected to the database as the same database user of the session that you want to cancel.
How the review tested this

Review: We tested whether rds_superuser was merely sufficient. The article says required. The service documentation explicitly permits same-user signaling and pg_signal_backend membership. We checked whether rds_superuser was merely sufficient. The article says required. The cited service documentation explicitly permits same-user signaling and pg_signal_backend membership.

Dangerous or recipe bugsNone in this edition.

Misleading / imprecise

F1

Imprecise: “…Insert order item after confirming inventory was decremented…”

IMPRECISEConsistent · partly holds after review

Claim ledger

Article says
…Insert order item after confirming inventory was decremented…
What is true
The illustrative pseudocode omits an explicit affected-row check. Its preceding prose requires rollback on zero rows. Its comment requires confirmation before inserting order_items. Implement UPDATE RETURNING or an affected-row check to enforce those instructions. PostgreSQL treats UPDATE 0 as success.
So what
Require exactly one inventory row from UPDATE RETURNING or the affected-row count. Otherwise ROLLBACK and retry before inserting order_items.

Source

Source · REL_17_11 · doc/src/sgml/ref/update.sgml:252-253<replaceable class="parameter">count</replaceable> is 0, no rows were updated by the query (this is not considered an error).
In the article · section “Split row pattern for high-contention data”

In the article

excerpt · section “Split row pattern for high-contention data” · as fetched 2026-10-21 · open in article ↗ (opens in new tab)

Split row pattern for high-contention data

-- First get the stripe count, then use random selection.
-- This SELECT takes no lock, so it can be routed to an Aurora reader instance
-- over a separate connection for better read scalability.
-- version_number is illustrative only -- add it to item_inventory_striped
-- if you want to try this pattern; the repo schema doesn't include it.

item_record = SELECT inventory_id, item_stripe_id, item_name, item_count, version_number
FROM item_inventory_striped
WHERE inventory_id = 123
AND item_count > 0
AND item_stripe_id = (SELECT floor(random() * stripe_count) + 1
FROM item_inventory_striping_config
WHERE inventory_id = 123);

-- Run your business logic

BEGIN TRANSACTION;

-- Rolled back if inventory lock/version check fails below
order_id = INSERT INTO orders (delivery_name, delivery_street_address, ...)
VALUES (...) RETURNING order_id;

TRY
-- FOR UPDATE NOWAIT only attaches to a SELECT, not directly to an UPDATE
-- so the lock is acquired (and the version re-checked) via this SELECT,
-- and the actual decrement happens in the UPDATE that follows,
-- now that the row is confirmed locked and unchanged.

SELECT item_count FROM item_inventory_striped
WHERE inventory_id = :item_record.inventory_id
AND item_stripe_id = :item_record.item_stripe_id
AND version_number = :item_record.version_number
FOR UPDATE NOWAIT;

UPDATE item_inventory_striped
SET item_count = item_count - 1,
version_number = version_number + 1
WHERE inventory_id = :item_record.inventory_id
AND item_stripe_id = :item_record.item_stripe_id
AND version_number = :item_record.version_number;

-- Insert order item after confirming inventory was decremented
INSERT INTO order_items (order_id, item_id, item_count, userid, order_dttm)
VALUES (order_id, :item_record.inventory_id, 1, userid, current_timestamp);

COMMIT;
CATCH lock_not_available -- SQLSTATE 55P03
-- Someone else is updating this stripe row right now; retry against a
-- newly selected stripe row rather than waiting on this one.

ROLLBACK;
-- If retry threshold is reached for a given order, return failure to the caller.

END TRY;
All sources and excerpts · 2
Evidence <replaceable class="parameter">count</replaceable> is 0, no rows were updated by the query (this is not considered an error).
Evidence the row. The search condition of the command (the <literal>WHERE</literal> clause) is re-evaluated to see if the updated version of the row still matches the search condition. If so, the second updater proceeds with its operation using the updated version of the row. In the case of
How the review tested this

Review: UPDATE 0 succeeds, but the article requires confirmation before inserting order_items. Its earlier instructions require rollback. The illustrative pseudocode omits an explicit implementation of that check. Charging a runnable dangerous recipe overstates this omission. The missing check survives. However, the article explicitly labels this example pseudocode and states that the repository does not implement it. Its earlier instructions require rollback after zero affected rows. Classify the incomplete illustration as misleading.

F2

Imprecise: “…which prevents concurrent sessions from accessing the row…”

IMPRECISEApplicable · partly holds after review

Claim ledger

Article says
…which prevents concurrent sessions from accessing the row…
What is true
FOR UPDATE acquires ROW SHARE on the table and separately locks selected rows. The row locks block competing writers and lockers, while ordinary SELECT remains possible (doc/src/sgml/mvcc.sgml:1252–1255). The example correctly illustrates blocked inventory changes but describes their lock mechanism too broadly.
So what
Use plain SELECT for ordinary availability reads. Diagnose blocked UPDATE statements through tuple and transaction conflicts rather than ROW SHARE alone.

Source

Source · REL_17_11 · doc/src/sgml/mvcc.sgml:1252-1255on the same row. Row-level locks do not affect data querying; they block only <emphasis>writers and lockers</emphasis> to the same row. Row-level locks are released at transaction end or during savepoint rollback, just like table-level locks.
In the article · section “Minimize lock duration in transactions”

In the article

excerpt · section “Minimize lock duration in transactions” · as fetched 2026-10-21 · open in article ↗ (opens in new tab)

Minimize lock duration in transactions

This code (FOR UPDATE) acquires a ROW SHARE LOCK at the start, which prevents concurrent sessions from accessing the row during user input and payment processing.

-- Step 1: Check availability without locking
SELECT item_count FROM item_inventory WHERE inventory_id = 123;

-- Step 2: Handle user interaction outside transaction
-- (user selects quantity, enters payment details)

-- Step 3: Only then acquire lock and update inventory
BEGIN;

order_id = INSERT INTO orders (delivery_name, delivery_street_address, ...)
VALUES (...) RETURNING order_id;

INSERT INTO order_items (order_id, item_id, item_count, userid, order_dttm)
VALUES (order_id, :item_record.inventory_id, 1, userid, current_timestamp);

UPDATE item_inventory
SET item_count = item_count - 1
WHERE inventory_id = 123
AND item_count > 0; -- Verify availability again

-- Check if update succeeded (item still available)
IF (rows_affected = 0)
THEN ROLLBACK; -- Rollback the insert in orders
ELSE
COMMIT;
END IF;

-- Step 4: Process payment via API outside transaction
payment_result = call_payment_gateway(payment_details);

-- Step 5: Check payment status and if payment failed, cancel the order
IF NOT payment_result
THEN
call_cancel_order_api(order_id);
END IF;
All sources and excerpts · 2
Evidence on the same row. Row-level locks do not affect data querying; they block only <emphasis>writers and lockers</emphasis> to the same row. Row-level locks are released at transaction end or during savepoint rollback, just like table-level locks.
Evidence Conflicts with the <literal>EXCLUSIVE</literal> and <literal>ACCESS EXCLUSIVE</literal> lock modes.
How the review tested this

Review: The surrounding example concerns competing inventory changes, which FOR UPDATE does block. The defect concerns lock scope and the unrestricted word accessing. The imprecise classification used in F16 fits this same defect. We tested the charitable reading that access means competing updates. The sentence still assigns row exclusion to ROW SHARE. The source distinguishes table locks, tuple locks, and ordinary reads.

F15

Imprecise: “…now that the row is confirmed locked and unchanged…”

IMPRECISEConsistent · partly holds after review

Claim ledger

Article says
…now that the row is confirmed locked and unchanged…
What is true
The illustrative pseudocode omits an explicit affected-row check. Its preceding prose requires rollback on zero rows. Its comment requires confirmation before inserting order_items. Implement UPDATE RETURNING or an affected-row check to enforce those instructions. PostgreSQL treats UPDATE 0 as success.
So what
Check that UPDATE affects exactly one row before inserting order_items. Roll back and retry after a zero-row result.

Source

Source · REL_17_11 · doc/src/sgml/ref/update.sgml:252-253<replaceable class="parameter">count</replaceable> is 0, no rows were updated by the query (this is not considered an error).
In the article · section “Split row pattern for high-contention data”

In the article

excerpt · section “Split row pattern for high-contention data” · as fetched 2026-10-21 · open in article ↗ (opens in new tab)

Split row pattern for high-contention data

-- First get the stripe count, then use random selection.
-- This SELECT takes no lock, so it can be routed to an Aurora reader instance
-- over a separate connection for better read scalability.
-- version_number is illustrative only -- add it to item_inventory_striped
-- if you want to try this pattern; the repo schema doesn't include it.

item_record = SELECT inventory_id, item_stripe_id, item_name, item_count, version_number
FROM item_inventory_striped
WHERE inventory_id = 123
AND item_count > 0
AND item_stripe_id = (SELECT floor(random() * stripe_count) + 1
FROM item_inventory_striping_config
WHERE inventory_id = 123);

-- Run your business logic

BEGIN TRANSACTION;

-- Rolled back if inventory lock/version check fails below
order_id = INSERT INTO orders (delivery_name, delivery_street_address, ...)
VALUES (...) RETURNING order_id;

TRY
-- FOR UPDATE NOWAIT only attaches to a SELECT, not directly to an UPDATE
-- so the lock is acquired (and the version re-checked) via this SELECT,
-- and the actual decrement happens in the UPDATE that follows,
-- now that the row is confirmed locked and unchanged.

SELECT item_count FROM item_inventory_striped
WHERE inventory_id = :item_record.inventory_id
AND item_stripe_id = :item_record.item_stripe_id
AND version_number = :item_record.version_number
FOR UPDATE NOWAIT;

UPDATE item_inventory_striped
SET item_count = item_count - 1,
version_number = version_number + 1
WHERE inventory_id = :item_record.inventory_id
AND item_stripe_id = :item_record.item_stripe_id
AND version_number = :item_record.version_number;

-- Insert order item after confirming inventory was decremented
INSERT INTO order_items (order_id, item_id, item_count, userid, order_dttm)
VALUES (order_id, :item_record.inventory_id, 1, userid, current_timestamp);

COMMIT;
CATCH lock_not_available -- SQLSTATE 55P03
-- Someone else is updating this stripe row right now; retry against a
-- newly selected stripe row rather than waiting on this one.

ROLLBACK;
-- If retry threshold is reached for a given order, return failure to the caller.

END TRY;
All sources and excerpts · 1
Evidence <replaceable class="parameter">count</replaceable> is 0, no rows were updated by the query (this is not considered an error).
How the review tested this

Review: We checked the entire pseudocode and preceding optimistic-concurrency instructions. They require confirmation and rollback, although the code omits an explicit check. The finding treats that omission as unconditional permission to commit. We considered the earlier rollback instruction and the pseudocode label. Neither supplies the missing branch in the displayed flow. UPDATE 0 does not trigger its lock-error handler.

F16

SELECT FOR UPDATE does not prevent ordinary reads of the row

IMPRECISEApplicable · holds up after review

Claim ledger

Article says
…prevents concurrent sessions from accessing the row…
What is true
ROW SHARE is a table-level lock. The accompanying row lock blocks conflicting writers and lockers, while ordinary reads continue. PostgreSQL documents both distinctions in doc/src/sgml/mvcc.sgml:933–949 and 1248–1257. Do not treat a locked inventory row as unreadable.
So what
Use plain SELECT for availability reads that do not require row locking. Investigate conflicting writes and locking reads separately.
Charitable reading
The sentence can describe competing updates. Its unrestricted word 'accessing' also includes ordinary reads, which these locks permit.

Source

Source · REL_17_11 · doc/src/sgml/mvcc.sgml:1248-1257on the same row. Row-level locks do not affect data querying; they block only <emphasis>writers and lockers</emphasis> to the same row. Row-level locks are released at transaction end or during savepoint rollback, just like table-level locks.
In the article · section “Minimize lock duration in transactions”

In the article

excerpt · section “Minimize lock duration in transactions” · as fetched 2026-10-21 · open in article ↗ (opens in new tab)

Minimize lock duration in transactions

This code (FOR UPDATE) acquires a ROW SHARE LOCK at the start, which prevents concurrent sessions from accessing the row during user input and payment processing.

-- Step 1: Check availability without locking
SELECT item_count FROM item_inventory WHERE inventory_id = 123;

-- Step 2: Handle user interaction outside transaction
-- (user selects quantity, enters payment details)

-- Step 3: Only then acquire lock and update inventory
BEGIN;

order_id = INSERT INTO orders (delivery_name, delivery_street_address, ...)
VALUES (...) RETURNING order_id;

INSERT INTO order_items (order_id, item_id, item_count, userid, order_dttm)
VALUES (order_id, :item_record.inventory_id, 1, userid, current_timestamp);

UPDATE item_inventory
SET item_count = item_count - 1
WHERE inventory_id = 123
AND item_count > 0; -- Verify availability again

-- Check if update succeeded (item still available)
IF (rows_affected = 0)
THEN ROLLBACK; -- Rollback the insert in orders
ELSE
COMMIT;
END IF;

-- Step 4: Process payment via API outside transaction
payment_result = call_payment_gateway(payment_details);

-- Step 5: Check payment status and if payment failed, cancel the order
IF NOT payment_result
THEN
call_cancel_order_api(order_id);
END IF;
All sources and excerpts · 2
Evidence on the same row. Row-level locks do not affect data querying; they block only <emphasis>writers and lockers</emphasis> to the same row. Row-level locks are released at transaction end or during savepoint rollback, just like table-level locks.
Evidence The <command>SELECT</command> command acquires a lock of this mode on all tables on which one of the <option>FOR UPDATE</option>,
How the review tested this

Review: We read accessing as competing inventory changes. That charitable reading preserves the example but leaves the ordinary-read and table-lock distinctions unstated. Imprecise fits. We tested the contextual reading that access means updates. The sentence still confuses the table lock with row exclusion. The narrower imprecision charge remains justified.

Verified accurate

F4

pg_stat_activity and pg_locks expose current monitoring data

ACCURATEFactual · holds up after review

Claim ledger

Article says
…system views ( pg_stat_activity , pg_locks )…
What is true
pg_stat_activity exposes backend PIDs and wait events. pg_locks reads lock-manager state through pg_lock_status(). These support current lock investigations. The pid column identifies the backend process.
Charitable reading
The article presents these views as current monitoring inputs, without claiming that either preserves historical lock trees.

Source

Source · REL_17_11 · doc/src/sgml/monitoring.sgml:752-752Process ID of this backend
In the article · section “Resolve Amazon Aurora PostgreSQL lock contention with Database Insights: Part 2”

In the article

excerpt · section “Resolve Amazon Aurora PostgreSQL lock contention with Database Insights: Part 2” · as fetched 2026-10-21 · open in article ↗ (opens in new tab)

Resolve Amazon Aurora PostgreSQL lock contention with Database Insights: Part 2

In Part 1 of this series, we covered PostgreSQL’s locking internals, demonstrated how row-level lock contention degrades throughput, and introduced basic monitoring techniques using system views ( pg_stat_activity , pg_locks ), the pgrowlocks extension, and the log_lock_waits parameter. These traditional methods have limitations, though: logs capture contention reactively after it occurs, querying system views requires constant monitoring to catch issues in real time, and the pgrowlocks extension performs full table scans that can impact production performance. In this post, we demonstrate how Amazon CloudWatch Database Insights provides comprehensive visibility into lock contention through unified monitoring and historical analysis. We show you how to use the Lock Analysis features , including the Lock Tree visualization that reveals blocking relationships between sessions. We then present practical solutions to resolve and prevent lock contention, including immediate fixes, configuration changes, and architectural patterns such as optimistic concurrency control, asynchronous processing, and row splitting.

All sources and excerpts · 4
Evidence Process ID of this backend
Evidence S.wait_event_type, S.wait_event,
EvidenceCREATE VIEW pg_locks AS SELECT * FROM pg_lock_status() AS L;
Evidence The view <structname>pg_locks</structname> provides access to information about the locks held by active processes within the database server. See <xref linkend="mvcc"/> for more discussion of locking.
How the review tested this

Review: We checked whether the finding implied historical monitoring. It restricts the claim to current investigations. The view definitions and PID documentation support it. We checked for an unsupported historical-monitoring claim. The finding describes current data only. The view definitions and documentation support its PID, wait-event, and lock-state statements.

F5

log_lock_waits records sufficiently long lock waits

ACCURATEFactual · holds up after review

Claim ledger

Article says
…the log_lock_waits parameter…
What is true
log_lock_waits produces messages after a session waits longer than deadlock_timeout for a lock. It supports the article's reactive contention-monitoring description.
Charitable reading
The introduction describes reactive monitoring rather than logging every lock acquisition.

Source

Source · REL_17_11 · doc/src/sgml/config.sgml:7795-7797Controls whether a log message is produced when a session waits longer than <xref linkend="guc-deadlock-timeout"/> to acquire a lock.
In the article · section “Resolve Amazon Aurora PostgreSQL lock contention with Database Insights: Part 2”

In the article

excerpt · section “Resolve Amazon Aurora PostgreSQL lock contention with Database Insights: Part 2” · as fetched 2026-10-21 · open in article ↗ (opens in new tab)

Resolve Amazon Aurora PostgreSQL lock contention with Database Insights: Part 2

In Part 1 of this series, we covered PostgreSQL’s locking internals, demonstrated how row-level lock contention degrades throughput, and introduced basic monitoring techniques using system views ( pg_stat_activity , pg_locks ), the pgrowlocks extension, and the log_lock_waits parameter. These traditional methods have limitations, though: logs capture contention reactively after it occurs, querying system views requires constant monitoring to catch issues in real time, and the pgrowlocks extension performs full table scans that can impact production performance. In this post, we demonstrate how Amazon CloudWatch Database Insights provides comprehensive visibility into lock contention through unified monitoring and historical analysis. We show you how to use the Lock Analysis features , including the Lock Tree visualization that reveals blocking relationships between sessions. We then present practical solutions to resolve and prevent lock contention, including immediate fixes, configuration changes, and architectural patterns such as optimistic concurrency control, asynchronous processing, and row splitting.

All sources and excerpts · 2
Evidence Controls whether a log message is produced when a session waits longer than <xref linkend="guc-deadlock-timeout"/> to acquire a lock.
Evidence gettext_noop("Logs long lock waits."),
How the review tested this

Review: We checked for a claim that every wait gets logged. The finding correctly includes the deadlock_timeout threshold. We checked whether the finding promises logging for every lock wait. It states the deadlock_timeout threshold explicitly. The parameter documentation confirms that threshold.

F6

Verified accurate: “…the pg_blocking_pids() function…”

ACCURATEFactual · partly holds after review

Claim ledger

Article says
…the pg_blocking_pids() function…
What is true
pg_blocking_pids returns blocker process IDs for the specified backend (E-25). Blockers include conflicting lock holders and conflicting requests ahead in the wait queue (E-26).

Source

Source · REL_17_11 · doc/src/sgml/func.sgml:24590-24593Returns an array of the process ID(s) of the sessions that are blocking the server process with the specified process ID from acquiring a lock, or an empty array if there is no such server process or it is not blocked.
In the article · section “Identifying lock contention using Database Insights”

In the article

excerpt · section “Identifying lock contention using Database Insights” · as fetched 2026-10-21 · open in article ↗ (opens in new tab)

Identifying lock contention using Database Insights

When CloudWatch Database Insights detects lock contention, it automatically queries pg_stat_activity and pg_locks views, and calls the pg_blocking_pids() function to capture detailed information about blocking and blocked sessions. To use Lock Analysis with Amazon Aurora PostgreSQL-compatible and Amazon Relational Database Service (Amazon RDS) for PostgreSQL databases, you need to enable Advanced mode in Database Insights .

All sources and excerpts · 2
Evidence Returns an array of the process ID(s) of the sessions that are blocking the server process with the specified process ID from acquiring a lock, or an empty array if there is no such server process or it is not blocked.
Evidence * The reported PIDs are those that hold a lock conflicting with blocked_pid's * current request (hard block), or are requesting such a lock and are ahead * of blocked_pid in the lock's wait queue (soft block).
How the review tested this

Review: We checked both blocker definitions. E-25 and E-26 support hard and soft blockers. Neither excerpt establishes the additional statement about session details from system views.

F7

pg_cancel_backend requests current-query cancellation

ACCURATEFactual · holds up after review

Claim ledger

Article says
…pg_cancel_backend() cancels the query…
What is true
pg_cancel_backend sends SIGINT to cancel the target backend's current query. It preserves the database session. The article correctly distinguishes this operation from pg_terminate_backend.
Charitable reading
The article targets a currently executing query and separately provides session termination.

Source

Source · REL_17_11 · doc/src/sgml/func.sgml:28178-28179Cancels the current query of the session whose backend process has the specified process ID.
In the article · section “Immediate resolution – Query termination”

In the article

excerpt · section “Immediate resolution – Query termination” · as fetched 2026-10-21 · open in article ↗ (opens in new tab)

Immediate resolution – Query termination

pg_cancel_backend() cancels the query that a session is currently executing while maintaining the session. For example, to cancel the query in one of the blocked sessions (with pid 28243 ), we can use:

SELECT pg_cancel_backend(28243);

-- Returns: t (true) if the signal was successfully sent
All sources and excerpts · 2
Evidence Cancels the current query of the session whose backend process has the specified process ID.
Evidence int r = pg_signal_backend(PG_GETARG_INT32(0), SIGINT);
How the review tested this

Review: We checked cancellation against session termination. The function sends SIGINT, and the documentation identifies the current query as its target. We checked whether the finding promises session termination or completed cancellation. It describes a cancellation request. The function sends SIGINT, and the documentation identifies the current query.

F8

Verified accurate: “…pg_terminate_backend() ends the entire database session…”

ACCURATEFactual · partly holds after review

Claim ledger

Article says
…pg_terminate_backend() ends the entire database session…
What is true
pg_terminate_backend sends SIGTERM to the target backend (E-30). PostgreSQL describes the function as terminating the session identified by its process ID (E-29).

Source

Source · REL_17_11 · doc/src/sgml/func.sgml:28252-28253Terminates the session whose backend process has the specified process ID.
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…pg_terminate_backend() ends the entire database session…
All sources and excerpts · 2
Evidence Terminates the session whose backend process has the specified process ID.
Evidence r = pg_signal_backend(pid, SIGTERM);
How the review tested this

Review: We checked the signal call and termination description. Neither cited excerpt establishes the default timeout or return-value semantics. Those details exceed the recorded source evidence.

F9

idle_in_transaction_session_timeout terminates idle transactional sessions

ACCURATEFactual · holds up after review

Claim ledger

Article says
…terminates sessions that remain idle within an open transaction…
What is true
idle_in_transaction_session_timeout limits idle time while an open transaction waits for client input. Expiration terminates the session. This check does not establish Aurora's default parameter value.
Charitable reading
We checked PostgreSQL behavior separately from the article's Aurora default value.

Source

Source · REL_17_11 · doc/src/sgml/config.sgml:9574-9576Terminate any session that has been idle (that is, waiting for a client query) within an open transaction for longer than the specified amount of time.
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…terminates sessions that remain idle within an open transaction…
All sources and excerpts · 2
Evidence Terminate any session that has been idle (that is, waiting for a client query) within an open transaction for longer than the specified amount of time.
Evidence gettext_noop("Sets the maximum allowed idle time between queries, when in a transaction."),
How the review tested this

Review: We checked whether upstream defaults were substituted for Aurora defaults. The finding explicitly excludes that default claim and correctly describes idle-transaction termination. We checked whether PostgreSQL evidence was used to certify Aurora's default. The finding explicitly excludes that default. Its idle-session behavior matches the parameter documentation.

F10

Verified accurate: “…maximum execution time for individual SQL statements…”

ACCURATEFactual · partly holds after review

Claim ledger

Article says
…maximum execution time for individual SQL statements…
What is true
statement_timeout aborts a statement that exceeds the specified duration (E-33). Its configuration definition identifies the limit as the maximum allowed duration of any statement (E-34).

Source

Source · REL_17_11 · doc/src/sgml/config.sgml:9465-9465Abort any statement that takes more than the specified amount of time.
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…maximum execution time for individual SQL statements…
All sources and excerpts · 2
Evidence Abort any statement that takes more than the specified amount of time.
Evidence gettext_noop("Sets the maximum allowed duration of any statement."),
How the review tested this

Review: We checked both timeout definitions. They establish a statement-duration limit. Neither cited excerpt describes transaction_timeout or explicitly documents timer handling across multiple statements.

F11

transaction_timeout covers explicit and implicit transactions in PostgreSQL 17

ACCURATEFactual · holds up after review

Claim ledger

Article says
…covering both explicit and implicit transactions…
What is true
transaction_timeout terminates sessions whose transactions exceed the limit. It covers BEGIN transactions and implicit single-statement transactions. We confirmed the behavior in PostgreSQL 17.0 and 17.11. Prepared transactions are excluded.
Charitable reading
The described explicit and implicit transactions are ordinary session transactions, rather than prepared transactions.

Source

Source · REL_17_11 · doc/src/sgml/config.sgml:9501-9504Terminate any session that spans longer than the specified amount of time in a transaction. The limit applies both to explicit transactions (started with <command>BEGIN</command>) and to an implicitly started transaction corresponding to a single statement.
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…covering both explicit and implicit transactions…
All sources and excerpts · 3
Evidence Terminate any session that spans longer than the specified amount of time in a transaction. The limit applies both to explicit transactions (started with <command>BEGIN</command>) and to an implicitly started transaction corresponding to a single statement.
Evidence gettext_noop("Sets the maximum allowed duration of any transaction within a session (not a prepared transaction)."),
Evidence Terminate any session that spans longer than the specified amount of time in a transaction. The limit applies both to explicit transactions (started with <command>BEGIN</command>) and to an implicitly started transaction corresponding to a single statement.

Version note: We checked the PostgreSQL 17.0 version floor.

How the review tested this

Review: We checked the PostgreSQL 17.0 floor and prepared-transaction exception. Both releases support the stated behavior, and the finding includes the exception. We tested the prepared-transaction exception and the PostgreSQL 17 version floor. Both recorded releases support the stated behavior. The finding explicitly excludes prepared transactions.

F12

lock_timeout limits individual lock acquisition waits

ACCURATEFactual · holds up after review

Claim ledger

Article says
…how long a session waits to acquire a lock before failing…
What is true
lock_timeout aborts a statement when a lock acquisition wait exceeds the limit. PostgreSQL applies it separately to each acquisition attempt. It does not limit the duration of an already-held lock.
Charitable reading
The article describes a lock-wait limit without claiming it limits how long an acquired lock remains held.

Source

Source · REL_17_11 · doc/src/sgml/config.sgml:9539-9540row, or other database object. The time limit applies separately to each lock acquisition attempt.
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…how long a session waits to acquire a lock before failing…
All sources and excerpts · 2
Evidence row, or other database object. The time limit applies separately to each lock acquisition attempt.
Evidence gettext_noop("Sets the maximum allowed duration of any wait for a lock."),
How the review tested this

Review: We checked whether lock_timeout limits held locks or cumulative waiting. The documentation specifies each acquisition attempt, as the finding states. We checked whether lock_timeout limits lock ownership or cumulative waiting. The finding correctly limits individual acquisition attempts. The parameter definition and documentation support that distinction.

F13

pgrowlocks scans the target table

ACCURATEFactual · holds up after review

Claim ledger

Article says
…pgrowlocks extension performs full table scans…
What is true
pgrowlocks reads target-table rows individually to collect tuple-lock information. Its unrestricted scan supports the article's warning about production overhead on large tables.
Charitable reading
The performance statement describes a possible production cost, not a measured cost for every table.

Source

Source · REL_17_11 · doc/src/sgml/pgrowlocks.sgml:93-95<function>pgrowlocks</function> takes <literal>AccessShareLock</literal> for the target table and reads each row one by one to collect the row locking information. This is not very speedy for a large table. Note that:
In the article · section “Resolve Amazon Aurora PostgreSQL lock contention with Database Insights: Part 2”

In the article

excerpt · section “Resolve Amazon Aurora PostgreSQL lock contention with Database Insights: Part 2” · as fetched 2026-10-21 · open in article ↗ (opens in new tab)

Resolve Amazon Aurora PostgreSQL lock contention with Database Insights: Part 2

In Part 1 of this series, we covered PostgreSQL’s locking internals, demonstrated how row-level lock contention degrades throughput, and introduced basic monitoring techniques using system views ( pg_stat_activity , pg_locks ), the pgrowlocks extension, and the log_lock_waits parameter. These traditional methods have limitations, though: logs capture contention reactively after it occurs, querying system views requires constant monitoring to catch issues in real time, and the pgrowlocks extension performs full table scans that can impact production performance. In this post, we demonstrate how Amazon CloudWatch Database Insights provides comprehensive visibility into lock contention through unified monitoring and historical analysis. We show you how to use the Lock Analysis features , including the Lock Tree visualization that reveals blocking relationships between sessions. We then present practical solutions to resolve and prevent lock contention, including immediate fixes, configuration changes, and architectural patterns such as optimistic concurrency control, asynchronous processing, and row splitting.

All sources and excerpts · 2
Evidence <function>pgrowlocks</function> takes <literal>AccessShareLock</literal> for the target table and reads each row one by one to collect the row locking information. This is not very speedy for a large table. Note that:
Evidence scan = table_beginscan(rel, GetActiveSnapshot(), 0, NULL);
How the review tested this

Review: We inspected the scan for restrictions that could defeat the full-table characterization. It starts without scan keys. No measured overhead claim appears in the finding. We checked whether pgrowlocks restricts its scan to locked rows. The implementation starts a scan without keys. The documentation explicitly describes reading each row.

F14

Verified accurate: “NOWAIT and SKIP LOCKED are mutually exclusive modifiers on the same locking clause…”

ACCURATEFactual · partly holds after review

Claim ledger

Article says
NOWAIT and SKIP LOCKED are mutually exclusive modifiers on the same locking clause…
What is true
Each locking clause chooses NOWAIT or SKIP LOCKED (E-42). NOWAIT reports an error when a selected row cannot be locked immediately. SKIP LOCKED skips that row (E-43). SQLSTATE 55P03 identifies lock_not_available (E-45).

Source

Source · REL_17_11 · doc/src/sgml/ref/select.sgml:48-48[ FOR { UPDATE | NO KEY UPDATE | SHARE | KEY SHARE } [ OF <replaceable class="parameter">from_reference</replaceable> [, ...] ] [ NOWAIT | SKIP LOCKED ] [...] ]
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)NOWAIT and SKIP LOCKED are mutually exclusive modifiers on the same locking clause…
All sources and excerpts · 4
Evidence [ FOR { UPDATE | NO KEY UPDATE | SHARE | KEY SHARE } [ OF <replaceable class="parameter">from_reference</replaceable> [, ...] ] [ NOWAIT | SKIP LOCKED ] [...] ]
Evidence To prevent the operation from waiting for other transactions to commit, use either the <literal>NOWAIT</literal> or <literal>SKIP LOCKED</literal> option. With <literal>NOWAIT</literal>, the statement reports an error, rather than waiting, if a selected row cannot be locked immediately. With <literal>SKIP LOCKED</literal>, any selected rows that cannot be immediately locked are skipped.
Evidence case TM_WouldBlock: /* couldn't lock tuple in SKIP LOCKED mode */ goto lnext;
Evidence55P03 E ERRCODE_LOCK_NOT_AVAILABLE lock_not_available
How the review tested this

Review: We checked syntax, skipped-tuple handling, and the error-code mapping. They support the distinct row-lock policies. The additional table-lock requirement does not appear in these excerpts.

F17

transaction_timeout exists at the stated PostgreSQL 17 floor

ACCURATEFactual · holds up after review

Claim ledger

Article says
transaction_timeout (PostgreSQL 17+)…
What is true
PostgreSQL 17.0 and 17.11 register transaction_timeout in src/backend/utils/misc/guc_tables.c:2635 and 2645, respectively. The article's PostgreSQL 17 version floor holds.
Charitable reading
The stated floor is PostgreSQL 17. We checked 17.0 as well as 17.11.

Source

Source · REL_17_0 · src/backend/utils/misc/guc_tables.c:2634-2644{"transaction_timeout", PGC_USERSET, CLIENT_CONN_STATEMENT,
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)transaction_timeout (PostgreSQL 17+)…
All sources and excerpts · 2
Evidence {"transaction_timeout", PGC_USERSET, CLIENT_CONN_STATEMENT,

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

Evidence {"transaction_timeout", PGC_USERSET, CLIENT_CONN_STATEMENT,
How the review tested this

Review: We independently read the parameter registrations in PostgreSQL 17.0 and 17.11. Both contain transaction_timeout at the cited locations. We independently checked both parameter registrations. PostgreSQL 17.0 and 17.11 contain transaction_timeout at the recorded commits. The finding establishes the stated version floor.

F18

Lock Analysis requires Database Insights Advanced mode

ACCURATEFactual · holds up after review

Claim ledger

Article says
…you need to enable Advanced mode in Database Insights…
What is true
AWS documents Advanced mode as a prerequisite for analyzing lock trees. The article correctly states that requirement for Lock Analysis.
Charitable reading
The requirement concerns Lock Analysis, rather than every Database Insights feature.

Source

Source · https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Database-Insights-Lock-Analysis.htmlTo analyze lock trees, you must have Database Insights Advance Mode enabled.
In the article · section “Identifying lock contention using Database Insights”

In the article

excerpt · section “Identifying lock contention using Database Insights” · as fetched 2026-10-21 · open in article ↗ (opens in new tab)

Identifying lock contention using Database Insights

When CloudWatch Database Insights detects lock contention, it automatically queries pg_stat_activity and pg_locks views, and calls the pg_blocking_pids() function to capture detailed information about blocking and blocked sessions. To use Lock Analysis with Amazon Aurora PostgreSQL-compatible and Amazon Relational Database Service (Amazon RDS) for PostgreSQL databases, you need to enable Advanced mode in Database Insights .

All sources and excerpts · 1
EvidenceTo analyze lock trees, you must have Database Insights Advance Mode enabled.
How the review tested this

Review: We checked whether the requirement covered all Database Insights features. Both the finding and documentation restrict it to lock-tree analysis. We checked whether the requirement applies to every Database Insights feature. The finding confines it to lock trees. The cited documentation states that requirement directly.

F19

statement_timeout applies separately to individual statements

ACCURATEFactual · holds up after review

Claim ledger

Article says
It applies separately to each statement in multi-statement transactions…
What is true
PostgreSQL 17.11 documents separate statement limits in doc/src/sgml/config.sgml:9474–9477. statement_timeout does not impose one cumulative limit on a multistatement transaction.
Charitable reading
The article distinguishes statement_timeout from the transaction-wide timeout.

Source

Source · REL_17_11 · doc/src/sgml/config.sgml:9474-9477The timeout is measured from the time a command arrives at the server until it is completed by the server. If multiple SQL statements appear in a single simple-query message, the timeout is applied to each statement separately.
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)It applies separately to each statement in multi-statement transactions…
All sources and excerpts · 1
Evidence The timeout is measured from the time a command arrives at the server until it is completed by the server. If multiple SQL statements appear in a single simple-query message, the timeout is applied to each statement separately.
How the review tested this

Review: We checked the historical whole-message behavior. The documentation confines that behavior to versions before PostgreSQL 13. The PostgreSQL 17 finding stands. We checked the multiple-statements-in-one-message case. PostgreSQL 17.11 explicitly applies statement_timeout separately to each statement. The finding does not promise a cumulative transaction limit.

F20

The retry ratio rounds to 31%

ACCURATEFactual · holds up after review

Claim ledger

Article says
…3,944,045, or approximately 31 percent of items processed…
What is true
The summary gives 30.8 retry attempts per 100 processed items (derived: 3,944,045 / 12,799,175 × 100). The article correctly rounds this ratio to 31%. Multiple retries can belong to one item.
Charitable reading
The percentage compares retry attempts with processed items. It does not count distinct items that required retries.

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

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…3,944,045, or approximately 31 percent of items processed…
How the review tested this

Review: We recalculated 30.8 retry attempts per 100 processed items. The finding correctly avoids treating attempts as distinct retried items. We recalculated 3,944,045 / 12,799,175 × 100 as 30.8%. The finding correctly distinguishes retry attempts from distinct retried items. It verifies arithmetic only.

F21

Verified accurate: “…about 0.024% of orders failed…”

ACCURATEFactual · partly holds after review

Claim ledger

Article says
…about 0.024% of orders failed…
What is true
The displayed counts yield 0.0238 failures per 100 processed items (derived: 3,040 / 12,799,175 × 100). This rounds to 0.024% (E-61, E-63). E-64 describes single-item orders but does not define the displayed counters. The calculation alone does not verify an order-failure rate.

Source

Source · https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql/512 concurrent sessions each ordering a single item from only 25 popular inventory rows.
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…about 0.024% of orders failed…
All sources and excerpts · 1
Evidence512 concurrent sessions each ordering a single item from only 25 popular inventory rows.
How the review tested this

Review: We recomputed the ratio and checked the single-item workload description. The rounding holds. One item per order does not establish whether total items processed counts attempts, successes, or another population.

F22

The reported throughput values imply a 55% reduction

ACCURATEFactual · holds up after review

Claim ledger

Article says
…55 perccent throughput reduction…
What is true
The reported throughput falls 55.0% from 10,900 TPS to 4,900 TPS (derived: (10,900 − 4,900) / 10,900 × 100). The arithmetic holds. These values alone do not isolate contention from the changed workload.
Charitable reading
The article discloses different concurrency and inventory distributions. We checked the percentage calculation separately from its causal explanation.

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

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…55 perccent throughput reduction…
How the review tested this

Review: We recalculated the 55.0% decrease and tested whether arithmetic validated causation. The finding expressly excludes that causal conclusion. We recalculated the reduction as 55.0%. We checked whether the finding certifies a controlled comparison. It explicitly separates correct arithmetic from an unproven causal explanation.

More in this report

Section checks · 10 sections

Section checks

AspectGradeFindingsCoverage
IntroductionA3 verified-accurate50% of claims (3 of 6, plus 1 that need data we do not have)provisional
PrerequisitesA1 verified-accurate100% of claims (1 of 1)
Identifying contentionA1 verified-accurate100% of claims (1 of 1)
Query terminationB+1 inaccuracy · 2 verified-accurate90% of claims (10 of 11)
Timeout parametersA6 verified-accurate66% of claims (8 of 12, plus 3 that need data we do not have)
Transaction durationA2 imprecise91% of claims (11 of 12, plus 5 that need data we do not have)
NOWAIT and SKIP LOCKEDA1 verified-accurate100% of claims (5 of 5)
Retries and failuresA2 verified-accurate100% of claims (6 of 6, plus 4 that need data we do not have)
Optimistic NOWAIT recipeA2 imprecise100% of claims (12 of 12)
ConclusionA1 verified-accurate100% of claims (3 of 3, plus 4 that need data we do not have)
Coverage and assessment · Checked 100 of 116 Postgres claims across 23 sections; 1 section below half

Central claim not verified. We checked PostgreSQL lock controls, but not the Database Insights workflow or the striped-inventory implementation and throughput.

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 verify the accompanying workload scripts, identifier mappings, or throughput and retry measurements.
  • We did not verify Aurora's 86,400,000 ms idle-transaction default or parameter availability in each engine version.
  • We did not inspect the Lock Tree screenshots.
  • We did not measure the proposed indexes, stripe-count changes, or compute-capacity comparison.
  • We did not verify the Aurora reader-routing claim or the closing MultiXact comparison.
  • We did not check the workload scripts or reproduce their retry and throughput measurements.
  • We did not inspect Figures 1–8.
  • We did not verify the 24-hour Aurora timeout default or the managed reader restrictions.
  • We did not verify Hibernate or Entity Framework support for optimistic concurrency control.
  • We did not check the asynchronous processing, insert-based logging, or cleanup recommendations.
  • We did not establish which Database Insights features changed after September 14, 2026.
  • We did not reproduce the reported throughput or retry measurements.
  • We did not read Figures 1–8 or check their displayed session identifiers and throughput values.
  • We did not verify that the workload scripts produced the displayed retry summary.
  • Safe: we did not complete every applicable check.
  • Section “Introduction”: we checked 3 of 7 checkable claims.
  • Section “Asynchronous queues”: we checked 0 of 1 checkable claims.
  • Section “Reader scaling”: we checked 4 of 10 checkable claims.
  • We could not decide whether the published benchmark details are complete.
  • We could not decide whether the article depends on finding F3.
Checked 100 of 116 Postgres claims across 23 sections; 1 section below half
  • Introduction: 3 of 6 Postgres claims checked, plus 1 that need data we do not have; not counted: 2 product or opinion, 4 not a claim; not checked: 3 for other reasons
  • Prerequisites: 1 of 1 Postgres claims checked; not counted: 8 product or opinion
  • Identifying contention: 1 of 1 Postgres claims checked; not counted: 2 product or opinion, 1 duplicate
  • Database Load: 1 claim is the author's own account; nothing checkable; not counted: 7 product or opinion
  • Lock Tree: 1 of 1 Postgres claims checked, plus 1 that need data we do not have; not counted: 10 product or opinion, 2 duplicate
  • Resolution strategy: no checkable claims; not counted: 1 product or opinion, 1 not a claim
  • Query termination: 10 of 11 Postgres claims checked; not counted: 1 product or opinion; not checked: 1 for other reasons
  • Timeout parameters: 8 of 12 Postgres claims checked, plus 3 that need data we do not have; not counted: 1 product or opinion; not checked: 4 for other reasons
  • Query optimization: 3 of 4 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 product or opinion; not checked: 1 for other reasons
  • Asynchronous queues: 0 of 1 Postgres claims checked; not counted: 4 product or opinion, 1 duplicate; not checked: 1 for other reasons
  • Transaction duration: 11 of 12 Postgres claims checked, plus 5 that need data we do not have; not counted: 2 product or opinion; not checked: 1 for other reasons
  • Optimistic concurrency: 4 of 4 Postgres claims checked; not counted: 3 product or opinion
  • Updates to inserts: 2 of 3 Postgres claims checked; not counted: 1 product or opinion; not checked: 1 for other reasons
  • Row splitting: 23 of 24 Postgres claims checked, plus 5 that need data we do not have; not counted: 3 product or opinion; not checked: 1 for other reasons
  • NOWAIT and SKIP LOCKED: 5 of 5 Postgres claims checked; not counted: 7 product or opinion, 1 duplicate
  • Striped workload: 1 of 1 Postgres claims checked, plus 5 that need data we do not have; not counted: 6 product or opinion, 2 duplicate
  • Retries and failures: 6 of 6 Postgres claims checked, plus 4 that need data we do not have; not counted: 2 product or opinion
  • Reader scaling: 4 of 7 Postgres claims checked, plus 3 that need data we do not have; not counted: 1 product or opinion, 8 duplicate; not checked: 3 for other reasons
  • Optimistic NOWAIT recipe: 12 of 12 Postgres claims checked; not counted: 4 product or opinion, 8 duplicate
  • Limitations: 2 of 2 Postgres claims checked; not counted: 3 product or opinion, 7 duplicate
  • Cleanup: no checkable claims; not counted: 11 product or opinion
  • Conclusion: 3 of 3 Postgres claims checked, plus 4 that need data we do not have; not counted: 3 product or opinion, 5 duplicate, 3 not a claim
  • Acknowledgements and authors: no checkable claims; not counted: 11 not a claim

Average of 4 axes: 3.33 · benchmark not reproducible, one step off (no hardware) · result B

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

Scorecard · the five axes
FACTS scorecard Scorecard radar, 5 axes, bigger is better. Overall B. Factual B+ · 1 wrong of 22 checked · 0 caveats. Applicable A · 0 wrong of 8 checked · 2 caveats. Consistent A · 0 wrong of 22 checked · 2 caveats. Transparent C · 0 wrong of 2 checked · 0 caveats · reproducibility: C (no hardware). Safe not applicable (n/a). B+ 1 wrong of 22 checked · 0 caveatsFactual B+1 wrong of 220 caveats A 0 wrong of 8 checked · 2 caveatsApplicable A0 wrong of 82 caveats A 0 wrong of 22 checked · 2 caveatsConsistent A0 wrong of 222 caveats C 0 wrong of 2 checked · 0 caveats reproducibility: C (no hardware)Transparent C0 wrong of 20 caveatsreproducibility: C(no hardware) not applicable (n/a), nothing to checkSafe n/anothingto check B

By topic: Introduction — 3 findings, 0 wrong · Prerequisites — 1 finding, 0 wrong · Identifying contention — 1 finding, 0 wrong · Query termination — 3 findings, 1 wrong · Timeout parameters — 6 findings, 0 wrong · Transaction duration — 2 findings, 0 wrong · NOWAIT and SKIP LOCKED — 1 finding, 0 wrong · Retries and failures — 2 findings, 0 wrong · Optimistic NOWAIT recipe — 2 findings, 0 wrong · Conclusion — 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 22 claims, 29 commands scanned.

AxisLetterWrongCaveatsCheckedCoverage
FactualB+1022assessed: B+ · 1 wrong of 22 checked · 0 caveats
ApplicableA028assessed: A · 0 wrong of 8 checked · 2 caveats
ConsistentA0222assessed: A · 0 wrong of 22 checked · 2 caveats
TransparentC002assessed: C · 0 wrong of 2 checked · 0 caveats · reproducibility: C (no hardware)
Safe—000partly assessed
Topics · 10 topics

Topics

TopicFactualApplicableConsistentTransparentSafe
Introduction0 issues 3 checked F4 F5 F130 issues 1 checked0 issues 3 checked
Prerequisites0 issues 1 checked F180 issues 1 checked0 issues 1 checked0 issues 1 checked
Identifying contention0 issues 1 checked F60 issues 1 checked
Query termination1 issue 3 checked F3 F7 F80 issues 1 checked0 issues 3 checked0 issues 1 checked
Timeout parameters0 issues 6 checked F9 F10 F11 F12 F17 F190 issues 2 checked0 issues 6 checked
Transaction duration0 issues 2 checked2 issues 2 checked F2 F160 issues 2 checked
NOWAIT and SKIP LOCKED0 issues 1 checked F140 issues 1 checked
Retries and failures0 issues 2 checked F20 F210 issues 2 checked
Optimistic NOWAIT recipe0 issues 2 checked0 issues 1 checked2 issues 2 checked F1 F15
Conclusion0 issues 1 checked F220 issues 1 checked

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

Revisions: 3 · B- -> B- -> B

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

  1. Revision 1 · 2026-10-16 12:39 UTC · B- · audited with v1.0.8 (approx.)

    Article as first submitted. 12 accurate · 3 wrong · 0 caveats.

    ElephantSeal: B-. Open: the benchmark cannot yet be rerun from what is published.

    Changes: First audit. Open: F1 “The optimistic update can commit an order without decrementing inventory” (false); F2 “ROW SHARE does not prevent concurrent access to the row” (false); F3 “Canceling or terminating sessions does not always require rds_superuser” (false).

  2. Revision 2 · 2026-10-19 03:38 UTC · B- · audited with v1.0.13 (approx.)

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

    ElephantSeal: B-. Open: the benchmark cannot yet be rerun from what is published.

    Changes: No longer reported: “The optimistic update can commit an order without decrementing inventory”; “ROW SHARE does not prevent concurrent access to the row”. New: F1 “…-- Insert order item after confirming inventory was decremented…” (misleading); F3 “…prevents concurrent sessions from accessing the row…” (misleading).

  3. Revision 3 · this page · 2026-10-21 04:06 UTC · B · audited with v1.0.17 (approx.) · regraded with v1.1.3

    Same article text, re-audited. 17 accurate · 1 wrong · 4 caveats.

    ElephantSeal: B. Open: the benchmark cannot yet be rerun from what is published.

    Changes: No longer reported: “…-- Insert order item after confirming inventory was decremented…”; “…prevents concurrent sessions from accessing the row…”. New: F1 “…Insert order item after confirming inventory was decremented…” (mostly accurate); F2 “…which prevents concurrent sessions from accessing the row…” (mostly accurate); F15 “…now that the row is confirmed locked and unchanged…” (mostly accurate); F16 “SELECT FOR UPDATE does not prevent ordinary reads of the row” (mostly accurate).

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: Resolve Amazon Aurora PostgreSQL lock contention with Database Insights: Part 2 \| Amazon Web Services

Article title: Resolve Amazon Aurora PostgreSQL lock contention with Database Insights: Part 2 \| Amazon Web Services
Article URL: https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2
Report URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75
Audited revision: 3 of 3, 2026-10-21 04:06:02 UTC
Overall letter: B

## Axes

- Factual: B+ · 1 wrong · 22 checked · 0 caveats · assessed
- Applicable: A · 0 wrong · 8 checked · 2 caveats · assessed
- Consistent: A · 0 wrong · 22 checked · 2 caveats · assessed
- Transparent: C · 0 wrong · 2 checked · 0 caveats · assessed
- Safe: — · 0 wrong · 0 checked · 0 caveats · partly assessed

ElephantSeal: B.
Open conditions: the benchmark cannot yet be rerun from what is published.

## Report metadata

- Report: Technical fact-check, edition 3
- pgTrue version: audited with v1.0.17 (approx.) · regraded with v1.1.3
- Issued: 2026-10-21
- 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 2 times; see Revisions below. Policy: [right-of-reply and corrections policy](/pgtrue/security).

## Findings needing a change (5)

### F3 · Inaccurate · Factual · Backend signaling does not always require rds_superuser
Location: excerpt · section “Immediate resolution – Query termination” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=Both%20functions%20require%20rds_superuser%20privileges)
Article says:
```text
…Both functions require rds_superuser privileges…
```
What is true:
The cited service documentation permits signaling another session owned by the same database user. It also permits members of pg_signal_backend. Requiring rds_superuser for every cancellation or termination overstates the privilege requirement.
So what:
Cancel or terminate the application's own sessions using the same database role. Use pg_signal_backend privileges for permitted cross-role signaling.
Charitable reading:
rds_superuser is sufficient for many administrative operations. The article says it is required for both functions.
Review: We tested whether rds_superuser was merely sufficient. The article says required. The service documentation explicitly permits same-user signaling and pg_signal_backend membership. We checked whether rds_superuser was merely sufficient. The article says required. The cited service documentation explicitly permits same-user signaling and pg_signal_backend membership.

Sources:
- [https://repost.aws/knowledge-center/rds-cancel-long-running-queries](https://repost.aws/knowledge-center/rds-cancel-long-running-queries)
  Excerpt:
  ```text
  You're an rds_superuser or a member of the default role pg_signal_backend . You're connected to the database as the same database user of the session that you want to cancel.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F3

### F1 · Imprecise · Consistent · Imprecise: “…Insert order item after confirming inventory was decremented…”
Location: excerpt · section “Split row pattern for high-contention data” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=Insert%20order%20item%20after%20confirming%20inventory%20was%20decremented)
Article says:
```text
…Insert order item after confirming inventory was decremented…
```
What is true:
The illustrative pseudocode omits an explicit affected-row check. Its preceding prose requires rollback on zero rows. Its comment requires confirmation before inserting order_items. Implement UPDATE RETURNING or an affected-row check to enforce those instructions. PostgreSQL treats UPDATE 0 as success.
So what:
Require exactly one inventory row from UPDATE RETURNING or the affected-row count. Otherwise ROLLBACK and retry before inserting order_items.
Review: UPDATE 0 succeeds, but the article requires confirmation before inserting order_items. Its earlier instructions require rollback. The illustrative pseudocode omits an explicit implementation of that check. Charging a runnable dangerous recipe overstates this omission. The missing check survives. However, the article explicitly labels this example pseudocode and states that the repository does not implement it. Its earlier instructions require rollback after zero affected rows. Classify the incomplete illustration as misleading.

Sources:
- [REL_17_11 · doc/src/sgml/ref/update.sgml:252-253](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/ref/update.sgml#L252-L253)
  Excerpt:
  ```text
  <replaceable class="parameter">count</replaceable> is 0, no rows were
   updated by the query (this is not considered an error).
  ```
- [REL_17_11 · doc/src/sgml/mvcc.sgml:349-352](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/mvcc.sgml#L349-L352)
  Excerpt:
  ```text
  the row.  The search condition of the command (the <literal>WHERE</literal> clause) is
    re-evaluated to see if the updated version of the row still matches the
    search condition.  If so, the second updater proceeds with its operation
    using the updated version of the row.  In the case of
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F1

### F2 · Imprecise · Applicable · Imprecise: “…which prevents concurrent sessions from accessing the row…”
Location: excerpt · section “Minimize lock duration in transactions” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=which%20prevents%20concurrent%20sessions%20from%20accessing%20the%20row)
Article says:
```text
…which prevents concurrent sessions from accessing the row…
```
What is true:
FOR UPDATE acquires ROW SHARE on the table and separately locks selected rows. The row locks block competing writers and lockers, while ordinary SELECT remains possible (doc/src/sgml/mvcc.sgml:1252–1255). The example correctly illustrates blocked inventory changes but describes their lock mechanism too broadly.
So what:
Use plain SELECT for ordinary availability reads. Diagnose blocked UPDATE statements through tuple and transaction conflicts rather than ROW SHARE alone.
Review: The surrounding example concerns competing inventory changes, which FOR UPDATE does block. The defect concerns lock scope and the unrestricted word accessing. The imprecise classification used in F16 fits this same defect. We tested the charitable reading that access means competing updates. The sentence still assigns row exclusion to ROW SHARE. The source distinguishes table locks, tuple locks, and ordinary reads.

Sources:
- [REL_17_11 · doc/src/sgml/mvcc.sgml:1252-1255](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/mvcc.sgml#L1252-L1255)
  Excerpt:
  ```text
  on the same row.  Row-level locks do not affect data querying; they
     block only <emphasis>writers and lockers</emphasis> to the same
     row.  Row-level locks are released at transaction end or during
     savepoint rollback, just like table-level locks.
  ```
- [REL_17_11 · doc/src/sgml/mvcc.sgml:937-938](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/mvcc.sgml#L937-L938)
  Excerpt:
  ```text
  Conflicts with the <literal>EXCLUSIVE</literal> and
         <literal>ACCESS EXCLUSIVE</literal> lock modes.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F2

### F15 · Imprecise · Consistent · Imprecise: “…now that the row is confirmed locked and unchanged…”
Location: excerpt · section “Split row pattern for high-contention data” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=now%20that%20the%20row%20is%20confirmed%20locked%20and%20unchanged)
Article says:
```text
…now that the row is confirmed locked and unchanged…
```
What is true:
The illustrative pseudocode omits an explicit affected-row check. Its preceding prose requires rollback on zero rows. Its comment requires confirmation before inserting order_items. Implement UPDATE RETURNING or an affected-row check to enforce those instructions. PostgreSQL treats UPDATE 0 as success.
So what:
Check that UPDATE affects exactly one row before inserting order_items. Roll back and retry after a zero-row result.
Review: We checked the entire pseudocode and preceding optimistic-concurrency instructions. They require confirmation and rollback, although the code omits an explicit check. The finding treats that omission as unconditional permission to commit. We considered the earlier rollback instruction and the pseudocode label. Neither supplies the missing branch in the displayed flow. UPDATE 0 does not trigger its lock-error handler.

Sources:
- [REL_17_11 · doc/src/sgml/ref/update.sgml:252-253](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/ref/update.sgml#L252-L253)
  Excerpt:
  ```text
  <replaceable class="parameter">count</replaceable> is 0, no rows were
   updated by the query (this is not considered an error).
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F15

### F16 · Imprecise · Applicable · SELECT FOR UPDATE does not prevent ordinary reads of the row
Location: excerpt · section “Minimize lock duration in transactions” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=prevents%20concurrent%20sessions%20from%20accessing%20the%20row)
Article says:
```text
…prevents concurrent sessions from accessing the row…
```
What is true:
ROW SHARE is a table-level lock. The accompanying row lock blocks conflicting writers and lockers, while ordinary reads continue. PostgreSQL documents both distinctions in doc/src/sgml/mvcc.sgml:933–949 and 1248–1257. Do not treat a locked inventory row as unreadable.
So what:
Use plain SELECT for availability reads that do not require row locking. Investigate conflicting writes and locking reads separately.
Charitable reading:
The sentence can describe competing updates. Its unrestricted word 'accessing' also includes ordinary reads, which these locks permit.
Review: We read accessing as competing inventory changes. That charitable reading preserves the example but leaves the ordinary-read and table-lock distinctions unstated. Imprecise fits. We tested the contextual reading that access means updates. The sentence still confuses the table lock with row exclusion. The narrower imprecision charge remains justified.

Sources:
- [REL_17_11 · doc/src/sgml/mvcc.sgml:1248-1257](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/mvcc.sgml#L1248-L1257)
  Excerpt:
  ```text
  on the same row.  Row-level locks do not affect data querying; they
     block only <emphasis>writers and lockers</emphasis> to the same
     row.  Row-level locks are released at transaction end or during
     savepoint rollback, just like table-level locks.
  ```
- [REL_17_11 · doc/src/sgml/mvcc.sgml:933-949](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/mvcc.sgml#L933-L949)
  Excerpt:
  ```text
  The <command>SELECT</command> command acquires a lock of this mode
         on all tables on which one of the <option>FOR UPDATE</option>,
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F16

## Verified accurate claims (17)

### F4 · Accurate · Factual · pg_stat_activity and pg_locks expose current monitoring data
Location: excerpt · section “Resolve Amazon Aurora PostgreSQL lock contention with Database Insights: Part 2” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=system%20views%20%28%20pg_stat_activity%20%2C%20pg_locks%20%29)
Article says:
```text
…system views ( pg_stat_activity , pg_locks )…
```
What is true:
pg_stat_activity exposes backend PIDs and wait events. pg_locks reads lock-manager state through pg_lock_status(). These support current lock investigations. The pid column identifies the backend process.
Charitable reading:
The article presents these views as current monitoring inputs, without claiming that either preserves historical lock trees.
Review: We checked whether the finding implied historical monitoring. It restricts the claim to current investigations. The view definitions and PID documentation support it. We checked for an unsupported historical-monitoring claim. The finding describes current data only. The view definitions and documentation support its PID, wait-event, and lock-state statements.

Sources:
- [REL_17_11 · doc/src/sgml/monitoring.sgml:752-752](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/monitoring.sgml#L752-L752)
  Excerpt:
  ```text
  Process ID of this backend
  ```
- [REL_17_11 · src/backend/catalog/system_views.sql:881-882](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/catalog/system_views.sql#L881-L882)
  Excerpt:
  ```text
  S.wait_event_type,
            S.wait_event,
  ```
- [REL_17_11 · src/backend/catalog/system_views.sql:401-402](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/catalog/system_views.sql#L401-L402)
  Excerpt:
  ```text
  CREATE VIEW pg_locks AS
    SELECT * FROM pg_lock_status() AS L;
  ```
- [REL_17_11 · doc/src/sgml/system-views.sgml:1328-1331](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/system-views.sgml#L1328-L1331)
  Excerpt:
  ```text
  The view <structname>pg_locks</structname> provides access to
   information about the locks held by active processes within the
   database server.  See <xref linkend="mvcc"/> for more discussion
   of locking.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F4

### F5 · Accurate · Factual · log_lock_waits records sufficiently long lock waits
Location: excerpt · section “Resolve Amazon Aurora PostgreSQL lock contention with Database Insights: Part 2” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=the%20log_lock_waits%20parameter)
Article says:
```text
…the log_lock_waits parameter…
```
What is true:
log_lock_waits produces messages after a session waits longer than deadlock_timeout for a lock. It supports the article's reactive contention-monitoring description.
Charitable reading:
The introduction describes reactive monitoring rather than logging every lock acquisition.
Review: We checked for a claim that every wait gets logged. The finding correctly includes the deadlock_timeout threshold. We checked whether the finding promises logging for every lock wait. It states the deadlock_timeout threshold explicitly. The parameter documentation confirms that threshold.

Sources:
- [REL_17_11 · doc/src/sgml/config.sgml:7795-7797](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/config.sgml#L7795-L7797)
  Excerpt:
  ```text
  Controls whether a log message is produced when a session waits
        longer than <xref linkend="guc-deadlock-timeout"/> to acquire a
        lock.
  ```
- [REL_17_11 · src/backend/utils/misc/guc_tables.c:1515-1515](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/utils/misc/guc_tables.c#L1515-L1515)
  Excerpt:
  ```text
  gettext_noop("Logs long lock waits."),
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F5

### F6 · Accurate · Factual · Verified accurate: “…the pg_blocking_pids() function…”
Location: excerpt · section “Identifying lock contention using Database Insights” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=the%20pg_blocking_pids%28%29%20function)
Article says:
```text
…the pg_blocking_pids() function…
```
What is true:
pg_blocking_pids returns blocker process IDs for the specified backend (E-25). Blockers include conflicting lock holders and conflicting requests ahead in the wait queue (E-26).
Review: We checked both blocker definitions. E-25 and E-26 support hard and soft blockers. Neither excerpt establishes the additional statement about session details from system views.

Sources:
- [REL_17_11 · doc/src/sgml/func.sgml:24590-24593](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/func.sgml#L24590-L24593)
  Excerpt:
  ```text
  Returns an array of the process ID(s) of the sessions that are
        blocking the server process with the specified process ID from
        acquiring a lock, or an empty array if there is no such server process
        or it is not blocked.
  ```
- [REL_17_11 · src/backend/utils/adt/lockfuncs.c:449-451](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/utils/adt/lockfuncs.c#L449-L451)
  Excerpt:
  ```text
  * The reported PIDs are those that hold a lock conflicting with blocked_pid's
 * current request (hard block), or are requesting such a lock and are ahead
 * of blocked_pid in the lock's wait queue (soft block).
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F6

### F7 · Accurate · Factual · pg_cancel_backend requests current-query cancellation
Location: excerpt · section “Immediate resolution – Query termination” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=pg_cancel_backend%28%29%20cancels%20the%20query)
Article says:
```text
…pg_cancel_backend() cancels the query…
```
What is true:
pg_cancel_backend sends SIGINT to cancel the target backend's current query. It preserves the database session. The article correctly distinguishes this operation from pg_terminate_backend.
Charitable reading:
The article targets a currently executing query and separately provides session termination.
Review: We checked cancellation against session termination. The function sends SIGINT, and the documentation identifies the current query as its target. We checked whether the finding promises session termination or completed cancellation. It describes a cancellation request. The function sends SIGINT, and the documentation identifies the current query.

Sources:
- [REL_17_11 · doc/src/sgml/func.sgml:28178-28179](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/func.sgml#L28178-L28179)
  Excerpt:
  ```text
  Cancels the current query of the session whose backend process has the
        specified process ID.
  ```
- [REL_17_11 · src/backend/storage/ipc/signalfuncs.c:124-124](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/storage/ipc/signalfuncs.c#L124-L124)
  Excerpt:
  ```text
  int			r = pg_signal_backend(PG_GETARG_INT32(0), SIGINT);
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F7

### F8 · Accurate · Factual · Verified accurate: “…pg_terminate_backend() ends the entire database session…”
Location: Article · exact quote · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=pg_terminate_backend%28%29%20ends%20the%20entire%20database%20session)
Article says:
```text
…pg_terminate_backend() ends the entire database session…
```
What is true:
pg_terminate_backend sends SIGTERM to the target backend (E-30). PostgreSQL describes the function as terminating the session identified by its process ID (E-29).
Review: We checked the signal call and termination description. Neither cited excerpt establishes the default timeout or return-value semantics. Those details exceed the recorded source evidence.

Sources:
- [REL_17_11 · doc/src/sgml/func.sgml:28252-28253](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/func.sgml#L28252-L28253)
  Excerpt:
  ```text
  Terminates the session whose backend process has the
        specified process ID.
  ```
- [REL_17_11 · src/backend/storage/ipc/signalfuncs.c:230-230](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/storage/ipc/signalfuncs.c#L230-L230)
  Excerpt:
  ```text
  r = pg_signal_backend(pid, SIGTERM);
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F8

### F9 · Accurate · Factual · idle_in_transaction_session_timeout terminates idle transactional sessions
Location: Article · exact quote · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=terminates%20sessions%20that%20remain%20idle%20within%20an%20open%20transaction)
Article says:
```text
…terminates sessions that remain idle within an open transaction…
```
What is true:
idle_in_transaction_session_timeout limits idle time while an open transaction waits for client input. Expiration terminates the session. This check does not establish Aurora's default parameter value.
Charitable reading:
We checked PostgreSQL behavior separately from the article's Aurora default value.
Review: We checked whether upstream defaults were substituted for Aurora defaults. The finding explicitly excludes that default claim and correctly describes idle-transaction termination. We checked whether PostgreSQL evidence was used to certify Aurora's default. The finding explicitly excludes that default. Its idle-session behavior matches the parameter documentation.

Sources:
- [REL_17_11 · doc/src/sgml/config.sgml:9574-9576](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/config.sgml#L9574-L9576)
  Excerpt:
  ```text
  Terminate any session that has been idle (that is, waiting for a
        client query) within an open transaction for longer than the
        specified amount of time.
  ```
- [REL_17_11 · src/backend/utils/misc/guc_tables.c:2635-2635](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/utils/misc/guc_tables.c#L2635-L2635)
  Excerpt:
  ```text
  gettext_noop("Sets the maximum allowed idle time between queries, when in a transaction."),
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F9

### F10 · Accurate · Factual · Verified accurate: “…maximum execution time for individual SQL statements…”
Location: Article · exact quote · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=maximum%20execution%20time%20for%20individual%20SQL%20statements)
Article says:
```text
…maximum execution time for individual SQL statements…
```
What is true:
statement_timeout aborts a statement that exceeds the specified duration (E-33). Its configuration definition identifies the limit as the maximum allowed duration of any statement (E-34).
Review: We checked both timeout definitions. They establish a statement-duration limit. Neither cited excerpt describes transaction_timeout or explicitly documents timer handling across multiple statements.

Sources:
- [REL_17_11 · doc/src/sgml/config.sgml:9465-9465](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/config.sgml#L9465-L9465)
  Excerpt:
  ```text
  Abort any statement that takes more than the specified amount of time.
  ```
- [REL_17_11 · src/backend/utils/misc/guc_tables.c:2613-2613](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/utils/misc/guc_tables.c#L2613-L2613)
  Excerpt:
  ```text
  gettext_noop("Sets the maximum allowed duration of any statement."),
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F10

### F11 · Accurate · Factual · transaction_timeout covers explicit and implicit transactions in PostgreSQL 17
Location: Article · exact quote · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=covering%20both%20explicit%20and%20implicit%20transactions)
Article says:
```text
…covering both explicit and implicit transactions…
```
What is true:
transaction_timeout terminates sessions whose transactions exceed the limit. It covers BEGIN transactions and implicit single-statement transactions. We confirmed the behavior in PostgreSQL 17.0 and 17.11. Prepared transactions are excluded.
Charitable reading:
The described explicit and implicit transactions are ordinary session transactions, rather than prepared transactions.
Review: We checked the PostgreSQL 17.0 floor and prepared-transaction exception. Both releases support the stated behavior, and the finding includes the exception. We tested the prepared-transaction exception and the PostgreSQL 17 version floor. Both recorded releases support the stated behavior. The finding explicitly excludes prepared transactions.

Sources:
- [REL_17_11 · doc/src/sgml/config.sgml:9501-9504](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/config.sgml#L9501-L9504)
  Excerpt:
  ```text
  Terminate any session that spans longer than the specified amount of
        time in a transaction. The limit applies both to explicit transactions
        (started with <command>BEGIN</command>) and to an implicitly started
        transaction corresponding to a single statement.
  ```
- [REL_17_11 · src/backend/utils/misc/guc_tables.c:2646-2646](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/utils/misc/guc_tables.c#L2646-L2646)
  Excerpt:
  ```text
  gettext_noop("Sets the maximum allowed duration of any transaction within a session (not a prepared transaction)."),
  ```
- [REL_17_0 · doc/src/sgml/config.sgml:9376-9379](https://github.com/postgres/postgres/blob/d7ec59a63d745ba74fba0e280bbf85dc6d1caa3e/doc/src/sgml/config.sgml#L9376-L9379)
  Qualification: Version note: We checked the PostgreSQL 17.0 version floor.
  Excerpt:
  ```text
  Terminate any session that spans longer than the specified amount of
        time in a transaction. The limit applies both to explicit transactions
        (started with <command>BEGIN</command>) and to an implicitly started
        transaction corresponding to a single statement.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F11

### F12 · Accurate · Factual · lock_timeout limits individual lock acquisition waits
Location: Article · exact quote · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=how%20long%20a%20session%20waits,acquire%20a%20lock%20before%20failing)
Article says:
```text
…how long a session waits to acquire a lock before failing…
```
What is true:
lock_timeout aborts a statement when a lock acquisition wait exceeds the limit. PostgreSQL applies it separately to each acquisition attempt. It does not limit the duration of an already-held lock.
Charitable reading:
The article describes a lock-wait limit without claiming it limits how long an acquired lock remains held.
Review: We checked whether lock_timeout limits held locks or cumulative waiting. The documentation specifies each acquisition attempt, as the finding states. We checked whether lock_timeout limits lock ownership or cumulative waiting. The finding correctly limits individual acquisition attempts. The parameter definition and documentation support that distinction.

Sources:
- [REL_17_11 · doc/src/sgml/config.sgml:9539-9540](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/config.sgml#L9539-L9540)
  Excerpt:
  ```text
  row, or other database object.  The time limit applies separately to
        each lock acquisition attempt.
  ```
- [REL_17_11 · src/backend/utils/misc/guc_tables.c:2624-2624](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/utils/misc/guc_tables.c#L2624-L2624)
  Excerpt:
  ```text
  gettext_noop("Sets the maximum allowed duration of any wait for a lock."),
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F12

### F13 · Accurate · Factual · pgrowlocks scans the target table
Location: excerpt · section “Resolve Amazon Aurora PostgreSQL lock contention with Database Insights: Part 2” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=pgrowlocks%20extension%20performs%20full%20table%20scans)
Article says:
```text
…pgrowlocks extension performs full table scans…
```
What is true:
pgrowlocks reads target-table rows individually to collect tuple-lock information. Its unrestricted scan supports the article's warning about production overhead on large tables.
Charitable reading:
The performance statement describes a possible production cost, not a measured cost for every table.
Review: We inspected the scan for restrictions that could defeat the full-table characterization. It starts without scan keys. No measured overhead claim appears in the finding. We checked whether pgrowlocks restricts its scan to locked rows. The implementation starts a scan without keys. The documentation explicitly describes reading each row.

Sources:
- [REL_17_11 · doc/src/sgml/pgrowlocks.sgml:93-95](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/pgrowlocks.sgml#L93-L95)
  Excerpt:
  ```text
  <function>pgrowlocks</function> takes <literal>AccessShareLock</literal> for the
   target table and reads each row one by one to collect the row locking
   information.  This is not very speedy for a large table.  Note that:
  ```
- [REL_17_11 · contrib/pgrowlocks/pgrowlocks.c:114-114](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/contrib/pgrowlocks/pgrowlocks.c#L114-L114)
  Excerpt:
  ```text
  scan = table_beginscan(rel, GetActiveSnapshot(), 0, NULL);
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F13

### F14 · Accurate · Factual · Verified accurate: “NOWAIT and SKIP LOCKED are mutually exclusive modifiers on the same locking clause…”
Location: Article · exact quote · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=NOWAIT%20and%20SKIP%20LOCKED%20are,on%20the%20same%20locking%20clause)
Article says:
```text
NOWAIT and SKIP LOCKED are mutually exclusive modifiers on the same locking clause…
```
What is true:
Each locking clause chooses NOWAIT or SKIP LOCKED (E-42). NOWAIT reports an error when a selected row cannot be locked immediately. SKIP LOCKED skips that row (E-43). SQLSTATE 55P03 identifies lock_not_available (E-45).
Review: We checked syntax, skipped-tuple handling, and the error-code mapping. They support the distinct row-lock policies. The additional table-lock requirement does not appear in these excerpts.

Sources:
- [REL_17_11 · doc/src/sgml/ref/select.sgml:48-48](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/ref/select.sgml#L48-L48)
  Excerpt:
  ```text
  [ FOR { UPDATE | NO KEY UPDATE | SHARE | KEY SHARE } [ OF <replaceable class="parameter">from_reference</replaceable> [, ...] ] [ NOWAIT | SKIP LOCKED ] [...] ]
  ```
- [REL_17_11 · doc/src/sgml/ref/select.sgml:1602-1607](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/ref/select.sgml#L1602-L1607)
  Excerpt:
  ```text
  To prevent the operation from waiting for other transactions to commit,
    use either the <literal>NOWAIT</literal> or <literal>SKIP LOCKED</literal>
    option.  With <literal>NOWAIT</literal>, the statement reports an error, rather
    than waiting, if a selected row cannot be locked immediately.
    With <literal>SKIP LOCKED</literal>, any selected rows that cannot be
    immediately locked are skipped.
  ```
- [REL_17_11 · src/backend/executor/nodeLockRows.c:193-195](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/executor/nodeLockRows.c#L193-L195)
  Excerpt:
  ```text
  case TM_WouldBlock:
				/* couldn't lock tuple in SKIP LOCKED mode */
				goto lnext;
  ```
- [REL_17_11 · src/backend/utils/errcodes.txt:421-421](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/utils/errcodes.txt#L421-L421)
  Excerpt:
  ```text
  55P03    E    ERRCODE_LOCK_NOT_AVAILABLE                                     lock_not_available
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F14

### F17 · Accurate · Factual · transaction_timeout exists at the stated PostgreSQL 17 floor
Location: Article · exact quote · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=transaction_timeout%20%28PostgreSQL%2017%2B%29)
Article says:
```text
transaction_timeout (PostgreSQL 17+)…
```
What is true:
PostgreSQL 17.0 and 17.11 register transaction_timeout in src/backend/utils/misc/guc_tables.c:2635 and 2645, respectively. The article's PostgreSQL 17 version floor holds.
Charitable reading:
The stated floor is PostgreSQL 17. We checked 17.0 as well as 17.11.
Review: We independently read the parameter registrations in PostgreSQL 17.0 and 17.11. Both contain transaction_timeout at the cited locations. We independently checked both parameter registrations. PostgreSQL 17.0 and 17.11 contain transaction_timeout at the recorded commits. The finding establishes the stated version floor.

Sources:
- [REL_17_0 · src/backend/utils/misc/guc_tables.c:2634-2644](https://github.com/postgres/postgres/blob/d7ec59a63d745ba74fba0e280bbf85dc6d1caa3e/src/backend/utils/misc/guc_tables.c#L2634-L2644)
  Qualification: Version note: Checked the article's PostgreSQL 17 version floor.
  Excerpt:
  ```text
  {"transaction_timeout", PGC_USERSET, CLIENT_CONN_STATEMENT,
  ```
- [REL_17_11 · src/backend/utils/misc/guc_tables.c:2644-2654](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/utils/misc/guc_tables.c#L2644-L2654)
  Excerpt:
  ```text
  {"transaction_timeout", PGC_USERSET, CLIENT_CONN_STATEMENT,
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F17

### F18 · Accurate · Factual · Lock Analysis requires Database Insights Advanced mode
Location: excerpt · section “Identifying lock contention using Database Insights” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=you%20need%20to%20enable%20Advanced%20mode%20in%20Database%20Insights)
Article says:
```text
…you need to enable Advanced mode in Database Insights…
```
What is true:
AWS documents Advanced mode as a prerequisite for analyzing lock trees. The article correctly states that requirement for Lock Analysis.
Charitable reading:
The requirement concerns Lock Analysis, rather than every Database Insights feature.
Review: We checked whether the requirement covered all Database Insights features. Both the finding and documentation restrict it to lock-tree analysis. We checked whether the requirement applies to every Database Insights feature. The finding confines it to lock trees. The cited documentation states that requirement directly.

Sources:
- [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Database-Insights-Lock-Analysis.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Database-Insights-Lock-Analysis.html)
  Excerpt:
  ```text
  To analyze lock trees, you must have Database Insights Advance Mode enabled.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F18

### F19 · Accurate · Factual · statement_timeout applies separately to individual statements
Location: Article · exact quote · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=It%20applies%20separately%20to%20each%20statement%20in%20multi%2Dstatement%20transactions)
Article says:
```text
It applies separately to each statement in multi-statement transactions…
```
What is true:
PostgreSQL 17.11 documents separate statement limits in doc/src/sgml/config.sgml:9474–9477. statement_timeout does not impose one cumulative limit on a multistatement transaction.
Charitable reading:
The article distinguishes statement_timeout from the transaction-wide timeout.
Review: We checked the historical whole-message behavior. The documentation confines that behavior to versions before PostgreSQL 13. The PostgreSQL 17 finding stands. We checked the multiple-statements-in-one-message case. PostgreSQL 17.11 explicitly applies statement_timeout separately to each statement. The finding does not promise a cumulative transaction limit.

Sources:
- [REL_17_11 · doc/src/sgml/config.sgml:9474-9477](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/config.sgml#L9474-L9477)
  Excerpt:
  ```text
  The timeout is measured from the time a command arrives at the
        server until it is completed by the server.  If multiple SQL
        statements appear in a single simple-query message, the timeout
        is applied to each statement separately.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F19

### F20 · Accurate · Factual · The retry ratio rounds to 31%
Location: Article · exact quote · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=3%2C944%2C045%2C%20or%20approximately%2031%20percent%20of%20items%20processed)
Article says:
```text
…3,944,045, or approximately 31 percent of items processed…
```
What is true:
The summary gives 30.8 retry attempts per 100 processed items (derived: 3,944,045 / 12,799,175 × 100). The article correctly rounds this ratio to 31%. Multiple retries can belong to one item.
Charitable reading:
The percentage compares retry attempts with processed items. It does not count distinct items that required retries.
Explanation: Checked for internal consistency: the evidence is the article itself.
Review: We recalculated 30.8 retry attempts per 100 processed items. The finding correctly avoids treating attempts as distinct retried items. We recalculated 3,944,045 / 12,799,175 × 100 as 30.8%. The finding correctly distinguishes retry attempts from distinct retried items. It verifies arithmetic only.

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F20

### F21 · Accurate · Factual · Verified accurate: “…about 0.024% of orders failed…”
Location: Article · exact quote · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=about%200.024%25%20of%20orders%20failed)
Article says:
```text
…about 0.024% of orders failed…
```
What is true:
The displayed counts yield 0.0238 failures per 100 processed items (derived: 3,040 / 12,799,175 × 100). This rounds to 0.024% (E-61, E-63). E-64 describes single-item orders but does not define the displayed counters. The calculation alone does not verify an order-failure rate.
Review: We recomputed the ratio and checked the single-item workload description. The rounding holds. One item per order does not establish whether total items processed counts attempts, successes, or another population.

Sources:
- [https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql/](https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql/)
  Excerpt:
  ```text
  512 concurrent sessions each ordering a single item from only 25 popular inventory rows.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F21

### F22 · Accurate · Factual · The reported throughput values imply a 55% reduction
Location: Article · exact quote · [open in article](https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2#:~:text=55%20perccent%20throughput%20reduction)
Article says:
```text
…55 perccent throughput reduction…
```
What is true:
The reported throughput falls 55.0% from 10,900 TPS to 4,900 TPS (derived: (10,900 − 4,900) / 10,900 × 100). The arithmetic holds. These values alone do not isolate contention from the changed workload.
Charitable reading:
The article discloses different concurrency and inventory distributions. We checked the percentage calculation separately from its causal explanation.
Explanation: Checked for internal consistency: the evidence is the article itself.
Review: We recalculated the 55.0% decrease and tested whether arithmetic validated causation. The finding expressly excludes that causal conclusion. We recalculated the reduction as 55.0%. We checked whether the finding certifies a controlled comparison. It explicitly separates correct arithmetic from an unproven causal explanation.

Finding URL: https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75#F22

## Notes (not graded) (0)

None.

## Withdrawn findings (0)

None.

## Section checks

- Introduction · A · 3 verified-accurate · 50% of claims (3 of 6, plus 1 that need data we do not have) provisional
- Prerequisites · A · 1 verified-accurate · 100% of claims (1 of 1)
- Identifying contention · A · 1 verified-accurate · 100% of claims (1 of 1)
- Query termination · B+ · 1 inaccuracy · 2 verified-accurate · 90% of claims (10 of 11)
- Timeout parameters · A · 6 verified-accurate · 66% of claims (8 of 12, plus 3 that need data we do not have)
- Transaction duration · A · 2 imprecise · 91% of claims (11 of 12, plus 5 that need data we do not have)
- NOWAIT and SKIP LOCKED · A · 1 verified-accurate · 100% of claims (5 of 5)
- Retries and failures · A · 2 verified-accurate · 100% of claims (6 of 6, plus 4 that need data we do not have)
- Optimistic NOWAIT recipe · A · 2 imprecise · 100% of claims (12 of 12)
- Conclusion · A · 1 verified-accurate · 100% of claims (3 of 3, plus 4 that need data we do not have)

## Claim coverage

- Introduction: 3 of 6 Postgres claims checked, plus 1 that need data we do not have; not counted: 2 product or opinion, 4 not a claim; not checked: 3 for other reasons
- Prerequisites: 1 of 1 Postgres claims checked; not counted: 8 product or opinion
- Identifying contention: 1 of 1 Postgres claims checked; not counted: 2 product or opinion, 1 duplicate
- Database Load: 1 claim is the author's own account; nothing checkable; not counted: 7 product or opinion
- Lock Tree: 1 of 1 Postgres claims checked, plus 1 that need data we do not have; not counted: 10 product or opinion, 2 duplicate
- Resolution strategy: no checkable claims; not counted: 1 product or opinion, 1 not a claim
- Query termination: 10 of 11 Postgres claims checked; not counted: 1 product or opinion; not checked: 1 for other reasons
- Timeout parameters: 8 of 12 Postgres claims checked, plus 3 that need data we do not have; not counted: 1 product or opinion; not checked: 4 for other reasons
- Query optimization: 3 of 4 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 product or opinion; not checked: 1 for other reasons
- Asynchronous queues: 0 of 1 Postgres claims checked; not counted: 4 product or opinion, 1 duplicate; not checked: 1 for other reasons
- Transaction duration: 11 of 12 Postgres claims checked, plus 5 that need data we do not have; not counted: 2 product or opinion; not checked: 1 for other reasons
- Optimistic concurrency: 4 of 4 Postgres claims checked; not counted: 3 product or opinion
- Updates to inserts: 2 of 3 Postgres claims checked; not counted: 1 product or opinion; not checked: 1 for other reasons
- Row splitting: 23 of 24 Postgres claims checked, plus 5 that need data we do not have; not counted: 3 product or opinion; not checked: 1 for other reasons
- NOWAIT and SKIP LOCKED: 5 of 5 Postgres claims checked; not counted: 7 product or opinion, 1 duplicate
- Striped workload: 1 of 1 Postgres claims checked, plus 5 that need data we do not have; not counted: 6 product or opinion, 2 duplicate
- Retries and failures: 6 of 6 Postgres claims checked, plus 4 that need data we do not have; not counted: 2 product or opinion
- Reader scaling: 4 of 7 Postgres claims checked, plus 3 that need data we do not have; not counted: 1 product or opinion, 8 duplicate; not checked: 3 for other reasons
- Optimistic NOWAIT recipe: 12 of 12 Postgres claims checked; not counted: 4 product or opinion, 8 duplicate
- Limitations: 2 of 2 Postgres claims checked; not counted: 3 product or opinion, 7 duplicate
- Cleanup: no checkable claims; not counted: 11 product or opinion
- Conclusion: 3 of 3 Postgres claims checked, plus 4 that need data we do not have; not counted: 3 product or opinion, 5 duplicate, 3 not a claim
- Acknowledgements and authors: no checkable claims; not counted: 11 not a claim

## What we did not check

- We did not verify the accompanying workload scripts, identifier mappings, or throughput and retry measurements.
- We did not verify Aurora's 86,400,000 ms idle-transaction default or parameter availability in each engine version.
- We did not inspect the Lock Tree screenshots.
- We did not measure the proposed indexes, stripe-count changes, or compute-capacity comparison.
- We did not verify the Aurora reader-routing claim or the closing MultiXact comparison.
- We did not check the workload scripts or reproduce their retry and throughput measurements.
- We did not inspect Figures 1–8.
- We did not verify the 24-hour Aurora timeout default or the managed reader restrictions.
- We did not verify Hibernate or Entity Framework support for optimistic concurrency control.
- We did not check the asynchronous processing, insert-based logging, or cleanup recommendations.
- We did not establish which Database Insights features changed after September 14, 2026.
- We did not reproduce the reported throughput or retry measurements.
- We did not read Figures 1–8 or check their displayed session identifiers and throughput values.
- We did not verify that the workload scripts produced the displayed retry summary.
- Safe: we did not complete every applicable check.
- Section “Introduction”: we checked 3 of 7 checkable claims.
- Section “Asynchronous queues”: we checked 0 of 1 checkable claims.
- Section “Reader scaling”: we checked 4 of 10 checkable claims.
- We could not decide whether the published benchmark details are complete.
- We could not decide whether the article depends on finding F3.

## Notes

- Central claim not verified. We checked PostgreSQL lock controls, but not the Database Insights workflow or the striped-inventory implementation and throughput.
- 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 4 axes: 3.33 · benchmark not reproducible, one step off (no hardware) · result B
- 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_17_11 at commit 083ac033419f690758508e08c1736089384bbee8 (pinned target); https://aws.amazon.com/blogs/database/category/database/amazon-aurora/ (fetched 2026-10-21T04:06:23.504859Z); https://aws.amazon.com/blogs/database/category/database/amazon-rds/rds-for-postgresql/ (fetched 2026-10-21T04:06:27.347291Z); https://aws.amazon.com/blogs/database/category/learning-levels/advanced-300/ (fetched 2026-10-21T04:06:20.699243Z); https://aws.amazon.com/blogs/database/category/post-types/technical-how-to/ (fetched 2026-10-21T04:06:30.452981Z); https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql/ (fetched 2026-10-21T04:06:33.950891Z); https://aws.amazon.com/rds/aurora/ (fetched 2026-10-21T04:06:45.935363Z); https://aws.amazon.com/rds/postgresql/ (fetched 2026-10-21T04:06:46.699792Z); https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Database-Insights-Lock-Analysis.html (fetched 2026-10-21T04:06:35.436550Z); https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Database-Insights.html (fetched 2026-10-21T04:06:34.786725Z); https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_GettingStartedAurora.AuroraPostgreSQL.FullConfig.html (fetched 2026-10-21T04:06:37.278064Z); https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_DatabaseInsights.TurningOnAdvanced.html (fetched 2026-10-21T04:06:37.858666Z); https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_WorkingWithDBClusterParamGroups.html (fetched 2026-10-21T04:06:52.998038Z); https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/ec2-rds-connect.html (fetched 2026-10-21T04:06:38.488860Z); https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithDBInstanceParamGroups.html (fetched 2026-10-21T04:06:52.273980Z); https://learn.microsoft.com/en-us/ef/ (fetched 2026-10-21T04:06:57.397716Z); https://repost.aws/knowledge-center/rds-cancel-long-running-queries (fetched 2026-10-21T04:06:50.394249Z); https://www.postgresql.org/docs/current/app-psql.htm (fetched 2026-10-21T04:06:40.660583Z); https://www.postgresql.org/docs/current/functions-info.html (fetched 2026-10-21T04:06:45.179363Z); https://www.postgresql.org/docs/current/monitoring-stats.html (fetched 2026-10-21T04:06:42.274724Z); https://www.postgresql.org/docs/current/runtime-config-client.html (fetched 2026-10-21T04:06:51.655404Z); https://www.postgresql.org/docs/current/sql-alteruser.html (fetched 2026-10-21T04:06:54.586189Z); https://www.postgresql.org/docs/current/view-pg-locks.html (fetched 2026-10-21T04:06:43.751129Z).
- Article captured 2026-10-21T04:06:02.386214Z · SHA-256 fcd3ca0641c0091b0f4bdc503c4798f34a4ed51c8bb8c9feeec98d0a60dbe041 · Text extracted from the article's HTML.
- Policy SHA-256 8f68267154d1a3e7c037adc9c79de0084683f6ee9f0998df682ddfea794c1942 · Grading rules SHA-256 6fb334e79d6b9e7ed81d3238cc10d9de602ff87ed65ff2fa781f53bac5798765.
- We did not verify the workload scripts or reproduce the throughput and retry measurements.
- We did not read Figures 1–8 or verify their displayed session identifiers and throughput values.
- We did not verify Aurora's 86,400,000 ms idle-transaction default or timeout availability across engine versions.
- We did not measure the proposed indexes, stripe-count changes, or compute-capacity comparison.
- We did not verify reader routing, the MultiXact comparison, or optimistic-concurrency support in Hibernate and Entity Framework.
- We did not check the asynchronous processing, insert-based logging, or cleanup recommendations.
- We did not establish which Database Insights features changed after September 14, 2026.
- source: postgres 17 was read at REL_17_11, its newest release when the article was published
- One fetched page is not listed above, because our policy does not allow linking it.
- review: the findings were written by one model and reviewed independently by a different model.
- 2026-10-30: Regraded under the current grading rules: the letter is the average of the axis letters, with every cap stated under it.
- 2 passages in this edition fell short of our own plain-English rules.
- Built from the article text captured above, one pinned source tree, and 22 fetched pages.
- 14 survived · 8 weakened · 0 withdrawn.

## Revision history

- [Revision 1](https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75?v=1) · 2026-10-16 12:39 UTC · B- · audited with v1.0.8 (approx.)
  Article as first submitted. 12 accurate · 3 wrong · 0 caveats.
  ElephantSeal: B-. Open: the benchmark cannot yet be rerun from what is published.
  Changes: First audit. Open: F1 “The optimistic update can commit an order without decrementing inventory” (false); F2 “ROW SHARE does not prevent concurrent access to the row” (false); F3 “Canceling or terminating sessions does not always require rds_superuser” (false).
- [Revision 2](https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75?v=3) · 2026-10-19 03:38 UTC · B- · audited with v1.0.13 (approx.)
  Same article text, re-audited. 18 accurate · 3 wrong · 0 caveats.
  ElephantSeal: B-. Open: the benchmark cannot yet be rerun from what is published.
  Changes: No longer reported: “The optimistic update can commit an order without decrementing inventory”; “ROW SHARE does not prevent concurrent access to the row”. New: F1 “…-- Insert order item after confirming inventory was decremented…” (misleading); F3 “…prevents concurrent sessions from accessing the row…” (misleading).
- [Revision 3](https://pgtrue.postgres.ai/shared/brief/ea1fd3f3-90d2-4103-ae12-0c08fdb61c75?v=6) · this page · 2026-10-21 04:06 UTC · B · audited with v1.0.17 (approx.) · regraded with v1.1.3
  Same article text, re-audited. 17 accurate · 1 wrong · 4 caveats.
  ElephantSeal: B. Open: the benchmark cannot yet be rerun from what is published.
  Changes: No longer reported: “…-- Insert order item after confirming inventory was decremented…”; “…prevents concurrent sessions from accessing the row…”. New: F1 “…Insert order item after confirming inventory was decremented…” (mostly accurate); F2 “…which prevents concurrent sessions from accessing the row…” (mostly accurate); F15 “…now that the row is confirmed locked and unchanged…” (mostly accurate); F16 “SELECT FOR UPDATE does not prevent ordinary reads of the row” (mostly accurate).

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