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: Troubleshooting row lock contention in Amazon Aurora PostgreSQL: Part 1 – Understanding row lock contention in PostgreSQL \| Amazon Web Services
Article title: Troubleshooting row lock contention in Amazon Aurora PostgreSQL: Part 1 – Understanding row lock contention in PostgreSQL \| Amazon Web Services
Article URL: https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql
Report URL: https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d
Audited revision: 6 of 6, 2026-10-21 03:56:36 UTC
Overall letter: A
## Axes
- Factual: A · 0 wrong · 12 checked · 0 caveats · assessed
- Applicable: A · 0 wrong · 5 checked · 0 caveats · assessed
- Consistent: A · 0 wrong · 12 checked · 0 caveats · assessed
- Transparent: — · 0 wrong · 2 checked · 0 caveats · assessed
- Safe: — · 0 wrong · 0 checked · 0 caveats · partly assessed
ElephantSeal: A.
## 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 5 times; see Revisions below. Policy: [right-of-reply and corrections policy](/pgtrue/security).
## Findings needing a change (0)
None.
## Verified accurate claims (12)
### F2 · Accurate · Factual · Session activity and blocker discovery support the monitoring query
Location: excerpt · section “Monitoring locks using system views and functions” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql#:~:text=view%20combined%20with%20the%20pg_blocking_pids%28%29,shows%20lock%20relationships%20between%20sessions)
Article says:
```text
…view combined with the pg_blocking_pids() function shows lock relationships between sessions…
```
What is true:
pg_stat_activity supplies the selected session fields. pg_blocking_pids() identifies incompatible lock holders and conflicting waiters ahead in the queue. system_views.sql:894-900 defines the activity fields. lockfuncs.c:553-554 emits blocking process IDs.
Charitable reading:
The article uses the function for lock relationships, not arbitrary waits such as buffer pins.
Review: We tested whether the finding overlooks queued blockers. E-12 explicitly includes hard and soft blocking. The selected activity fields match E-13. We tested whether blocker discovery excludes queued blockers. E-12 explicitly includes conflicting waiters ahead in the queue. The selected activity fields and emitted blocker identifiers match the finding.
Sources:
- [REL_18_6 · doc/src/sgml/func.sgml:25002-25005](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L25002-L25005)
Excerpt:
```text
One server process blocks another if it either holds a lock that
conflicts with the blocked process's lock request (hard block), or is
waiting for a lock that would conflict with the blocked process's lock
request and is ahead of it in the wait queue (soft block). When using
```
- [REL_18_6 · src/backend/catalog/system_views.sql:894-900](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/system_views.sql#L894-L900)
Excerpt:
```text
S.wait_event_type,
S.wait_event,
S.state,
S.backend_xid,
s.backend_xmin,
S.query_id,
S.query,
```
- [REL_18_6 · src/backend/utils/adt/lockfuncs.c:553-554](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/lockfuncs.c#L553-L554)
Excerpt:
```text
/* blocked by this entry, so emit a record */
arrayelems[narrayelems++] = Int32GetDatum(instance->leaderPid);
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d#F2
### F3 · Accurate · Factual · The transaction-ID query does not enumerate tuple-header locks
Location: excerpt · section “Monitoring locks using system views and functions” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql#:~:text=not%20the%20individual%20row%20locks%20stored%20in%20data%20pages)
Article says:
```text
…not the individual row locks stored in data pages…
```
What is true:
pg_locks normally represents a row-lock wait through the holder's transaction ID. It does not enumerate every locked tuple. system-views.sgml:1916-1921 documents this distinction. The article's transaction-ID filter matches that behavior.
Charitable reading:
The sentence describes tuple-header locks and the transaction-ID-filtered example. It does not deny heavyweight tuple locks exist.
Review: We tested whether heavyweight tuple locks contradict the finding. Its distinction concerns tuple-header ownership and the transaction-ID-filtered query. E-15 supports that distinction. We tested whether heavyweight tuple entries contradict this finding. E-15 distinguishes stored row locks from transaction-ID waits. The article's filtered query supports the narrower interpretation.
Sources:
- [REL_18_6 · doc/src/sgml/system-views.sgml:1916-1921](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/system-views.sgml#L1916-L1921)
Excerpt:
```text
Although tuples are a lockable type of object,
information about row-level locks is stored on disk, not in memory,
and therefore row-level locks normally do not appear in this view.
If a process is waiting for a
row-level lock, it will usually appear in the view as waiting for the
permanent transaction ID of the current holder of that row lock.
```
- [REL_18_6 · src/backend/catalog/system_views.sql:397-398](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/system_views.sql#L397-L398)
Excerpt:
```text
CREATE VIEW pg_locks AS
SELECT * FROM pg_lock_status() AS L;
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d#F3
### F4 · Accurate · Factual · The identifier query returns the current backend and transaction
Location: excerpt · section “Example of row locks” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql#:~:text=SELECT%20pg_backend_pid%28%29%2C%20txid_current%28%29%3B)
Article says:
```text
…SELECT pg_backend_pid(), txid_current();…
```
What is true:
pg_backend_pid() returns MyProcPid in pgstatfuncs.c:692. txid_current() returns the current top-level transaction ID. It assigns an ID when necessary. The article uses both functions consistently with their documented meanings.
Charitable reading:
The displayed identifiers are examples, not values another installation must return.
Review: We checked ID assignment and subtransaction semantics. E-18 links txid_current() to the behavior documented in E-19. The finding does not authenticate displayed identifiers. We checked transaction-ID assignment and subtransaction behavior. E-18 connects txid_current() to the documented current-ID function. E-19 confirms assignment and top-level transaction semantics. The finding does not authenticate example identifiers.
Sources:
- [REL_18_6 · src/backend/utils/adt/pgstatfuncs.c:689-693](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/pgstatfuncs.c#L689-L693)
Excerpt:
```text
Datum
pg_backend_pid(PG_FUNCTION_ARGS)
{
PG_RETURN_INT32(MyProcPid);
}
```
- [REL_18_6 · doc/src/sgml/func.sgml:27810-27814](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L27810-L27814)
Excerpt:
```text
<function>txid_current</function> ()
<returnvalue>bigint</returnvalue>
</para>
<para>
See <function>pg_current_xact_id()</function>.
```
- [REL_18_6 · doc/src/sgml/func.sgml:27560-27564](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L27560-L27564)
Excerpt:
```text
Returns the current transaction's ID. It will assign a new one if the
current transaction does not have one already (because it has not
performed any database updates); see <xref
linkend="transaction-id"/> for details. If executed in a
subtransaction, this will return the top-level transaction ID;
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d#F4
### F5 · Accurate · Factual · Enabled lock-wait logging uses the deadlock timeout
Location: excerpt · section “Logging using the log_lock_waits parameter” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql#:~:text=logs%20lock%20wait%20events%20that%20exceed%20deadlock_timeout%20%28default%201%20second%29)
Article says:
```text
…logs lock wait events that exceed deadlock_timeout (default 1 second)…
```
What is true:
log_lock_waits reports waits after deadlock_timeout. The default delay is 1,000 milliseconds in guc_tables.c:2266-2274. proc.c:1592 gates reporting on enabled logging and the deadlock check. proc.c:1653-1656 also logs eventual acquisition.
Charitable reading:
The article explicitly conditions its example on enabled lock-wait logging.
Review: We tested the disabled-by-default objection. The article and finding condition reporting on enabled log_lock_waits. E-22 confirms the reporting gate. We checked whether disabled logging defeats the claim. Both the finding and surrounding article condition the example on enabled logging. The source confirms the threshold, default, and acquisition message.
Sources:
- [REL_18_6 · doc/src/sgml/config.sgml:8041-8044](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L8041-L8044)
Excerpt:
```text
Controls whether a log message is produced when a session waits
longer than <xref linkend="guc-deadlock-timeout"/> to acquire a
lock. This is useful in determining if lock waits are causing
poor performance. The default is <literal>off</literal>.
```
- [REL_18_6 · src/backend/utils/misc/guc_tables.c:2266-2274](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L2266-L2274)
Excerpt:
```text
{"deadlock_timeout", PGC_SUSET, LOCK_MANAGEMENT,
gettext_noop("Sets the time to wait on a lock before checking for deadlock."),
NULL,
GUC_UNIT_MS
},
&DeadlockTimeout,
1000, 1, INT_MAX,
NULL, NULL, NULL
},
```
- [REL_18_6 · src/backend/storage/lmgr/proc.c:1588-1592](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/lmgr/proc.c#L1588-L1592)
Excerpt:
```text
/*
* If awoken after the deadlock check interrupt has run, and
* log_lock_waits is on, then report about the wait.
*/
if (log_lock_waits && deadlock_state != DS_NOT_YET_CHECKED)
```
- [REL_18_6 · src/backend/storage/lmgr/proc.c:1653-1656](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/lmgr/proc.c#L1653-L1656)
Excerpt:
```text
else if (myWaitStatus == PROC_WAIT_STATUS_OK)
ereport(LOG,
(errmsg("process %d acquired %s on %s after %ld.%03d ms",
MyProcPid, modename, buf.data, msecs, usecs)));
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d#F5
### F6 · Accurate · Factual · pgrowlocks scans the table to inspect row locks
Location: excerpt · section “Examining row locks using the pgrowlocks extension” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql#:~:text=pgrowlocks%20performs%20a%20full%20table%20scan)
Article says:
```text
…pgrowlocks performs a full table scan…
```
What is true:
pgrowlocks reads rows sequentially to collect lock information. pgrowlocks.c:116-124 starts the scan and repeatedly fetches tuples. pgrowlocks.sgml:93-95 warns about large-table cost. The article correctly warns against unrestricted production scans.
Charitable reading:
Avoiding production use is conservative operational advice, not a claim that PostgreSQL forbids it.
Review: We checked whether pgrowlocks restricts its scan to locked rows. E-25 starts an unrestricted scan. The finding treats production avoidance as operational advice. We tested whether the scan uses filtering or guarantees production disruption. E-25 shows an unrestricted scan and tuple loop. E-24 warns about large-table cost. The finding treats production avoidance as conservative advice.
Sources:
- [REL_18_6 · doc/src/sgml/pgrowlocks.sgml:93-95](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/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_18_6 · contrib/pgrowlocks/pgrowlocks.c:116-124](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/contrib/pgrowlocks/pgrowlocks.c#L116-L124)
Excerpt:
```text
/* Scan the relation */
scan = table_beginscan(rel, GetActiveSnapshot(), 0, NULL);
hscan = (HeapScanDesc) scan;
attinmeta = TupleDescGetAttInMetadata(rsinfo->setDesc);
values = (char **) palloc(rsinfo->setDesc->natts * sizeof(char *));
while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL)
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d#F6
### F7 · Accurate · Factual · Verified accurate: “FOR UPDATE serves as the most restrictive mode…”
Location: excerpt · section “How locks work in PostgreSQL” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql#:~:text=FOR%20UPDATE%20serves%20as%20the%20most%20restrictive%20mode)
Article says:
```text
FOR UPDATE serves as the most restrictive mode…
```
What is true:
FOR UPDATE conflicts with all four row-lock modes. FOR NO KEY UPDATE permits FOR KEY SHARE. REL_18_6 src/backend/access/heap/README.tuplock:65-69 gives this conflict table. This verifies the mode ordering, not the displayed UPDATE execution.
Review: We checked the conflict matrix and surrounding lock descriptions. E-26 establishes mode compatibility. Its quoted range does not establish which mode the example's UPDATE acquires. Remove the example verification from this finding.
Sources:
- [REL_18_6 · src/backend/access/heap/README.tuplock:65-69](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/heap/README.tuplock#L65-L69)
Excerpt:
```text
UPDATE NO KEY UPDATE SHARE KEY SHARE
UPDATE conflict conflict conflict conflict
NO KEY UPDATE conflict conflict conflict
SHARE conflict conflict
KEY SHARE conflict
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d#F7
### F8 · Accurate · Factual · Tuple headers store persistent row-lock information
Location: excerpt · section “How locks work in PostgreSQL” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql#:~:text=stores%20lock%20information%20directly%20in,system%20column%20%28%20xmax%20%29)
Article says:
```text
…stores lock information directly in the row’s internal system column ( xmax )…
```
What is true:
heapam.c:5387-5393 writes lock flags and xmax into the tuple header. Ordinary row locks need no shared-memory entry per locked row. After marking the tuple, heapam.c:5480-5485 releases the heavyweight tuple lock if acquisition required one.
Charitable reading:
The reference to xmax summarizes tuple-header ownership. It does not claim xmax alone encodes every lock mode or multiple locker.
Review: We tested whether xmax alone carries lock information. The finding includes tuple-header flags and conditional heavyweight-lock release, matching E-27 and E-28. We checked whether xmax alone stores every lock attribute. The finding correctly includes tuple-header flags. E-28 explicitly makes heavyweight lock release conditional on prior acquisition.
Sources:
- [REL_18_6 · src/backend/access/heap/heapam.c:5387-5393](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/heap/heapam.c#L5387-L5393)
Excerpt:
```text
tuple->t_data->t_infomask &= ~HEAP_XMAX_BITS;
tuple->t_data->t_infomask2 &= ~HEAP_KEYS_UPDATED;
tuple->t_data->t_infomask |= new_infomask;
tuple->t_data->t_infomask2 |= new_infomask2;
if (HEAP_XMAX_IS_LOCKED_ONLY(new_infomask))
HeapTupleHeaderClearHotUpdated(tuple->t_data);
HeapTupleHeaderSetXmax(tuple->t_data, xid);
```
- [REL_18_6 · src/backend/access/heap/heapam.c:5480-5485](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/heap/heapam.c#L5480-L5485)
Excerpt:
```text
/*
* Now that we have successfully marked the tuple as locked, we can
* release the lmgr tuple lock, if we had it.
*/
if (have_tuple_lock)
UnlockTupleTuplock(relation, tid, mode);
```
- [REL_18_6 · doc/src/sgml/mvcc.sgml:1353-1355](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/mvcc.sgml#L1353-L1355)
Excerpt:
```text
<productname>PostgreSQL</productname> doesn't remember any
information about modified rows in memory, so there is no limit on
the number of rows locked at one time. However, locking a row
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d#F8
### F10 · Accurate · Factual · The second update waits for the open transaction
Location: excerpt · section “Example of row locks” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql#:~:text=In%20another%20session%2C%20trying%20to,waiting%20for%20a%20row%20lock)
Article says:
```text
…In another session, trying to update the same row would hang waiting for a row lock…
```
What is true:
The second UPDATE waits while the first transaction holds the conflicting row lock. PostgreSQL 18 explicit-locking documentation confirms this behavior. This verifies the blocking explanation, not the recorded session identifiers.
Charitable reading:
The example leaves the first transaction open and uses the default blocking update behavior.
Review: We checked the open-transaction premise and the retrieved documentation version. E-31 supports waiting for conflicting locks. The finding excludes verification of recorded identifiers. We checked the open-transaction hypothesis and the fetched page's version label. The page identifies PostgreSQL 18 and confirms conflicting-lock waits. The finding limits verification to blocking behavior.
Sources:
- [https://www.postgresql.org/docs/current/explicit-locking.html](https://www.postgresql.org/docs/current/explicit-locking.html)
Excerpt:
```text
a transaction seeking either a table-level or row-level lock will wait indefinitely for conflicting locks to be released.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d#F10
### F12 · Accurate · Factual · Verified accurate: “…PostgreSQL will also record when a waiting session is able to acquire the lock…”
Location: excerpt · section “Logging using the log_lock_waits parameter” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql#:~:text=PostgreSQL%20will%20also%20record%20when,able%20to%20acquire%20the%20lock)
Article says:
```text
…PostgreSQL will also record when a waiting session is able to acquire the lock…
```
What is true:
REL_18_6 src/backend/storage/lmgr/proc.c:1653-1656 logs acquisition when myWaitStatus equals PROC_WAIT_STATUS_OK within the logging block. The message includes elapsed milliseconds. This verifies the successful-acquisition message format, not the example's recorded elapsed time.
Review: We checked the successful-wait branch and its enclosing condition. E-35 includes the branch and message. Its range excludes the log_lock_waits guard at line 1592. Narrow verification to the branch and message format.
Sources:
- [REL_18_6 · src/backend/storage/lmgr/proc.c:1630-1695](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/lmgr/proc.c#L1630-L1695)
Excerpt:
```text
(errmsg("process %d acquired %s on %s after %ld.%03d ms",
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d#F12
### F13 · Accurate · Factual · Historical lock analysis requires collecting view contents
Location: Article · exact quote · [open in article](https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql#:~:text=Querying%20pg_stat_activity%20and%20pg_locks%20requires%20constant%20monitoring)
Article says:
```text
Querying pg_stat_activity and pg_locks requires constant monitoring…
```
What is true:
pg_stat_activity describes current process activity. pg_locks describes active locks. PostgreSQL 18.6 documents those scopes in monitoring.sgml:714 and system-views.sgml:1665. Historical analysis requires retaining observations over time.
Charitable reading:
Constant monitoring means ongoing collection for historical analysis, rather than an uninterrupted SQL query.
Review: We tested whether current activity or active locks provide historical records. E-37 and E-38 describe current state. The finding requires retained observations, without claiming complete capture. We tested whether constant monitoring requires an uninterrupted query. The finding reasonably reads it as ongoing collection. E-37 and E-38 describe current activity and active locks, without historical retention.
Sources:
- [REL_18_6 · doc/src/sgml/monitoring.sgml:713-717](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/monitoring.sgml#L713-L717)
Excerpt:
```text
The <structname>pg_stat_activity</structname> view will have one row
per server process, showing information related to
the current activity of that process.
```
- [REL_18_6 · doc/src/sgml/system-views.sgml:1657-1736](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/system-views.sgml#L1657-L1736)
Excerpt:
```text
information about the locks held by active processes within the
database server.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d#F13
### F14 · Accurate · Factual · deadlock_timeout defaults to one second
Location: excerpt · section “Logging using the log_lock_waits parameter” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql#:~:text=deadlock_timeout%20%28default%201%20second%29)
Article says:
```text
…deadlock_timeout (default 1 second)…
```
What is true:
PostgreSQL 18.6 defines deadlock_timeout as 1,000 milliseconds by default. src/backend/utils/misc/guc_tables.c:2269 specifies milliseconds. Line 2272 sets the default to 1,000.
Charitable reading:
The article states the PostgreSQL default, rather than claiming every configured cluster uses that value.
Review: We checked the unit and default independently. E-40 specifies 1,000 milliseconds. E-43 agrees. The finding does not assert an observed cluster setting. We checked units and distinguished the default from cluster configuration. E-40 specifies 1,000 milliseconds. The fetched PostgreSQL 18 documentation independently confirms one second.
Sources:
- [REL_18_6 · src/backend/utils/misc/guc_tables.c:2266-2274](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L2266-L2274)
Excerpt:
```text
GUC_UNIT_MS
},
&DeadlockTimeout,
1000, 1, INT_MAX,
```
- [https://www.postgresql.org/docs/current/runtime-config-locks.html](https://www.postgresql.org/docs/current/runtime-config-locks.html)
Excerpt:
```text
The default is one second ( 1s )
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d#F14
### F15 · Accurate · Factual · The stated throughput rates imply a 55% reduction
Location: Article · exact quote · [open in article](https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql#:~:text=Throughput%20dropped%20to%20approximately%204%2C900,second%2C%20a%2055%20percent%20reduction)
Article says:
```text
Throughput dropped to approximately 4,900 transactions per second, a 55 percent reduction…
```
What is true:
Throughput falls by 55.0% (derived: 100 × (10,900 − 4,900) / 10,900). The remaining throughput is 45.0% of baseline. Both percentages match the article's rounding.
Charitable reading:
The article rounds both throughput rates and the percentage.
Explanation: Checked for internal consistency: the evidence is the article itself.
Review: We recalculated the reduction as 55.0459% and remaining throughput as 44.9541%. Both round correctly. The finding verifies arithmetic, not measurements or causation. We recomputed the reduction as 55.0459% and remaining throughput as 44.9541%. Both round as stated. The finding verifies arithmetic without authenticating measurements or attributing causation.
Finding URL: https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d#F15
## Notes (not graded) (2)
### F1 · Note · · Note: “It then acquires a temporary tuple lock in shared memory…”
Location: excerpt · section “How locks work in PostgreSQL” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql#:~:text=It%20then%20acquires%20a%20temporary%20tuple%20lock%20in%20shared%20memory)
Article says:
```text
It then acquires a temporary tuple lock in shared memory…
```
What is true:
Heavyweight tuple-lock acquisition is conditional, as README.tuplock:36-37 and heapam.c:5150-5152 show. The article describes the contended path without stating that qualification. Its monitoring advice already uses transaction-ID waits and pg_blocking_pids(). The wording does not establish wasted diagnostic work.
So what:
Use transaction-ID waits and pg_blocking_pids() to diagnose contention. Do not expect every locked row to have a heavyweight tuple-lock entry.
Explanation: Not graded: no reader would act differently on it.
Review: The acquisition caveat survives, but the claimed diagnostic cost does not. The article describes temporary locks and already recommends transaction-ID diagnostics. F1's reader action repeats that advice. The unconditional acquisition description is wrong. The claimed diagnostic cost does not follow. The article explains temporary lock release and recommends transaction-ID monitoring. Its monitoring guidance already matches the proposed reader action.
Sources:
- [REL_18_6 · src/backend/access/heap/README.tuplock:36-37](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/heap/README.tuplock#L36-L37)
Excerpt:
```text
starve out waiting exclusive-lockers. However, if there is not any active
conflict for a tuple, we don't incur any extra overhead.
```
- [REL_18_6 · src/backend/access/heap/heapam.c:5150-5152](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/heap/heapam.c#L5150-L5152)
Excerpt:
```text
if (!skip_tuple_lock &&
!heap_acquire_tuplock(relation, tid, mode, wait_policy,
&have_tuple_lock))
```
- [REL_18_6 · src/backend/access/heap/heapam.c:5480-5485](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/heap/heapam.c#L5480-L5485)
Excerpt:
```text
/*
* Now that we have successfully marked the tuple as locked, we can
* release the lmgr tuple lock, if we had it.
*/
if (have_tuple_lock)
UnlockTupleTuplock(relation, tid, mode);
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d#F1
### F9 · Note · · The blockers array contains blocking PIDs
Location: excerpt · section “Monitoring locks using system views and functions” · as fetched 2026-10-21 · [open in article](https://aws.amazon.com/blogs/database/troubleshooting-row-lock-contention-in-amazon-aurora-postgresql-part-1-understanding-row-lock-contention-in-postgresql#:~:text=blocking%20process%20ID%20%28%20pid%20%29)
Article says:
```text
…blocking process ID ( pid )…
```
What is true:
The pid column identifies the inspected session. The blockers array contains that session's blocking process IDs. The example correctly shows session 2053 blocked by session 1943. Only the introductory column label reverses these meanings.
Charitable reading:
The displayed blockers array and example output communicate the relationship correctly. The introductory column label is the defect.
Explanation: Not graded: knowing this would not change what a reader does.
Review: We tested the charitable reading that the query returns both kinds of PID. It does. The note correctly limits the defect to the introductory label. We checked whether the introductory wording changes the displayed diagnosis. The output identifies blockers correctly. E-14 confirms that pg_blocking_pids() supplies blocker identifiers. A note matches the limited wording defect.
Sources:
- [REL_18_6 · doc/src/sgml/func.sgml:25002-25005](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L25002-L25005)
Excerpt:
```text
One server process blocks another if it either holds a lock that
conflicts with the blocked process's lock request (hard block), or is
waiting for a lock that would conflict with the blocked process's lock
request and is ahead of it in the wait queue (soft block). When using
```
- [REL_18_6 · src/backend/utils/adt/lockfuncs.c:553-554](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/lockfuncs.c#L553-L554)
Excerpt:
```text
/* blocked by this entry, so emit a record */
arrayelems[narrayelems++] = Int32GetDatum(instance->leaderPid);
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d#F9
## Withdrawn findings (0)
None.
## Section checks
- Lock internals · A · 2 verified-accurate · 75% of claims (12 of 16, plus 1 that need data we do not have)
- Row lock example · A · 2 verified-accurate · 92% of claims (12 of 13)
- Flash-sale load · A · 1 verified-accurate · 1 checked · 9 need data we do not have
- System views · A · 2 verified-accurate · 100% of claims (18 of 18, plus 4 that need data we do not have)
- Row lock inspection · A · 1 verified-accurate · 100% of claims (10 of 10, plus 2 that need data we do not have)
- Lock wait logging · A · 3 verified-accurate · 100% of claims (4 of 4, plus 4 that need data we do not have)
- Conclusion · A · 1 verified-accurate · 100% of claims (3 of 3)
## Claim coverage
- Introduction: 5 of 5 Postgres claims checked, plus 3 that need data we do not have; not counted: 3 product or opinion, 1 duplicate, 3 not a claim
- Prerequisites: 0 of 1 Postgres claims checked, plus 1 that need data we do not have; not counted: 6 product or opinion; not checked: 1 for other reasons
- Lock internals: 12 of 16 Postgres claims checked, plus 1 that need data we do not have; not counted: 2 product or opinion, 1 duplicate, 1 not a claim; not checked: 4 for other reasons
- Row lock example: 12 of 13 Postgres claims checked; not counted: 3 duplicate, 1 not a claim; not checked: 1 for other reasons
- Workload schema: 3 of 3 Postgres claims checked, plus 12 that need data we do not have; not counted: 5 product or opinion, 1 duplicate, 3 not a claim
- Average load: 0 of 2 Postgres claims checked, plus 10 that need data we do not have; not counted: 1 product or opinion, 2 duplicate, 1 not a claim; not checked: 2 for other reasons
- Flash-sale load: 1 checked, plus 9 that need data we do not have; not counted: 4 product or opinion, 6 duplicate, 1 not a claim
- Contention scenarios: no checkable claims; not counted: 5 product or opinion, 1 duplicate
- Monitoring locks: no checkable claims; not counted: 1 product or opinion, 2 not a claim
- System views: 18 of 18 Postgres claims checked, plus 4 that need data we do not have; not counted: 2 duplicate
- Row lock inspection: 10 of 10 Postgres claims checked, plus 2 that need data we do not have; not counted: 1 not a claim
- Lock wait logging: 4 of 4 Postgres claims checked, plus 4 that need data we do not have; not counted: 3 duplicate, 1 not a claim
- Cleanup: no checkable claims; not counted: 12 product or opinion, 2 not a claim
- Conclusion: 3 of 3 Postgres claims checked; not counted: 4 product or opinion, 6 duplicate, 2 not a claim
- Authors: no checkable claims; not counted: 8 not a claim
## What we did not check
- We did not reproduce the throughput, wait-event percentages, or session measurements the article displays.
- We did not inspect the article's five dashboard figures.
- We did not verify the accompanying schema, data generator, workload scripts, or retry implementation.
- We did not verify Aurora's storage implementation or service-specific configuration and cleanup behavior.
- We did not verify the CloudWatch transaction metric or its mapping to completed orders.
- We did not finish checking checkpoint writes or the investigation approach's applicability to every workload.
- We did not read the five Database Insights chart images or verify their underlying measurements.
- We did not reproduce the displayed SQL outputs or workload measurements.
- We did not inspect the workload scripts or CloudFormation templates to verify their behavior.
- We did not establish equal applicability of every Aurora monitoring feature to RDS PostgreSQL.
- We did not establish post-publication changes to Aurora monitoring features.
- We did not verify the claimed lock frequency, memory comparison, concurrency improvement, or reduction in deadlock risk.
- We did not reproduce the throughput and lock-wait measurements.
- We did not read Figures 1–5 to verify the throughput charts or the 95% database-load total.
- We did not verify the test's row counts, session counts, item counts, or db.r8g.4xlarge instance configuration.
- Safe: we did not complete every applicable check.
- Section “Prerequisites”: we checked 0 of 2 checkable claims.
- Section “Average load”: we checked 0 of 12 checkable claims.
- We could not decide whether the article contains a material benchmark.
## Notes
- A — the findings address the article's main subject. What we did not check is listed below. The findings directly check Part 1’s row-lock mechanisms, blocking-session queries, row inspection, and lock-wait logging.
- 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 3 axes: 4 · result A
- Some explanatory text is not shown in this edition; the grade and findings are complete.
- Some checks did not happen for this edition, and each one we know of is listed above.
- Checked against: github.com/postgres/postgres REL_18_6 at commit 724edf9bde9d356724ad384a2e196edc3c9f80f7 (pinned target); https://aws.amazon.com/blogs/database/category/database/amazon-aurora/ (fetched 2026-10-21T03:57:02.190035Z); https://aws.amazon.com/blogs/database/category/database/amazon-rds/rds-for-postgresql/ (fetched 2026-10-21T03:57:06.096928Z); https://aws.amazon.com/blogs/database/category/learning-levels/advanced-300/ (fetched 2026-10-21T03:56:58.885703Z); https://aws.amazon.com/blogs/database/category/post-types/technical-how-to/ (fetched 2026-10-21T03:57:09.005685Z); https://aws.amazon.com/blogs/database/resolve-amazon-aurora-postgresql-lock-contention-with-database-insights-part-2/ (fetched 2026-10-21T03:57:13.349151Z); https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-console-delete-stack.html (fetched 2026-10-21T03:57:31.879227Z); https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-root-volume-delete-on-termination.html (fetched 2026-10-21T03:57:32.473289Z); https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html (fetched 2026-10-21T03:57:33.067760Z); https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_GettingStartedAurora.AuroraPostgreSQL.FullConfig.html (fetched 2026-10-21T03:57:14.002683Z); https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_DatabaseInsights.TurningOnAdvanced.html (fetched 2026-10-21T03:57:14.649662Z); https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/apg-waits.cpu.html (fetched 2026-10-21T03:57:24.420408Z); https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/apg-waits.lockbuffercontent.html (fetched 2026-10-21T03:57:23.750124Z); https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/apg-waits.locktransactionid.html (fetched 2026-10-21T03:57:26.939483Z); https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/apg-waits.locktuple.html (fetched 2026-10-21T03:57:28.270763Z); https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/apg-waits.lw-lock-manager.html (fetched 2026-10-21T03:57:27.620391Z); https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/apg-waits.xactsync.html (fetched 2026-10-21T03:57:23.103359Z); https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/ec2-rds-connect.html (fetched 2026-10-21T03:57:15.332335Z); https://docs.aws.amazon.com/ebs/latest/userguide/ebs-deleting-volume.html (fetched 2026-10-21T03:57:33.679996Z); https://www.postgresql.org/docs/current/app-psql.htm (fetched 2026-10-21T03:57:17.521347Z); https://www.postgresql.org/docs/current/ddl-system-columns.html (fetched 2026-10-21T03:57:20.420033Z); https://www.postgresql.org/docs/current/explicit-locking.html (fetched 2026-10-21T03:57:10.184933Z); https://www.postgresql.org/docs/current/monitoring-stats.html (fetched 2026-10-21T03:57:30.188631Z); https://www.postgresql.org/docs/current/runtime-config-locks.html (fetched 2026-10-21T03:57:31.223784Z).
- Article captured 2026-10-21T03:56:36.416361Z · SHA-256 437a366130cbcf237c05ddab371b44753a62903733361e944003f942e80517da · Text extracted from the article's HTML.
- Policy SHA-256 852a1939150b0b14f41b2e81de99d2d6281db079343714415f459d8e44841f76 · Grading rules SHA-256 6fb334e79d6b9e7ed81d3238cc10d9de602ff87ed65ff2fa781f53bac5798765.
- We did not reproduce the displayed SQL outputs, throughput measurements, or wait-event percentages.
- We did not read Figures 1–5 to verify the dashboard measurements or the 95% database-load total.
- We did not verify the accompanying schema, data generator, workload scripts, retry implementation, or CloudFormation templates.
- We did not verify the workload’s row counts, session counts, item counts, or db.r8g.4xlarge configuration.
- We did not verify Aurora’s storage implementation, service-specific configuration, cleanup behavior, or equal monitoring-feature availability on RDS PostgreSQL.
- We did not verify the CloudWatch transaction metric’s mapping to completed orders.
- We did not verify the claimed lock frequency, memory comparison, concurrency improvement, checkpoint-write behavior, or reduction in deadlock risk.
- We did not establish post-publication changes to Aurora monitoring features.
- The article gives September 14, 2026, without a time. We list that date at midnight UTC.
- source: the article names no postgres release, so it was read at REL_18_6, the latest release when it 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.
- 7 passages in this edition fell short of our own plain-English rules.
- Built from the article text captured above, one pinned source tree, and 23 fetched pages.
- 12 survived · 3 weakened · 0 withdrawn.
## Revision history
- [Revision 1](https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d?v=2) · 2026-10-16 12:37 UTC · B · audited with v1.0.8 (approx.)
Article as first submitted. 10 accurate · 0 wrong · 1 caveat.
ElephantSeal: B. Open: the benchmark cannot yet be rerun from what is published.
Changes: First audit. Open: F1 “Temporary tuple locks arbitrate conflicts” (mostly accurate).
- [Revision 2](https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d?v=4) · 2026-10-18 18:00 UTC · B · audited with v1.0.11 (approx.)
Same article text, re-audited. 13 accurate · 0 wrong · 0 caveats.
ElephantSeal: B. Open: the benchmark cannot yet be rerun from what is published.
Changes: No longer reported: “Temporary tuple locks arbitrate conflicts”. New: none.
- [Revision 3](https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d?v=6) · 2026-10-18 21:51 UTC · A · audited with v1.0.12 (approx.)
Same article text, re-audited. 13 accurate · 0 wrong · 0 caveats.
ElephantSeal: A.
Changes: No change in findings.
- [Revision 4](https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d?v=8) · 2026-10-19 03:35 UTC · A · audited with v1.0.13 (approx.)
Same article text, re-audited. 14 accurate · 0 wrong · 0 caveats.
ElephantSeal: A.
Changes: No change in findings.
- [Revision 5](https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d?v=10) · 2026-10-19 21:33 UTC · A · audited with v1.0.16 (approx.)
Same article text, re-audited. 13 accurate · 0 wrong · 0 caveats.
ElephantSeal: A.
Changes: No change in findings.
- [Revision 6](https://pgtrue.postgres.ai/shared/brief/f01d0141-796c-4a87-a3bf-3ec19aa9cc7d?v=13) · this page · 2026-10-21 03:56 UTC · A · audited with v1.0.17 (approx.) · regraded with v1.1.3
Same article text, re-audited. 12 accurate · 0 wrong · 0 caveats.
ElephantSeal: A.
Changes: No change in findings.