Limited beta · What is this?

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

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

pgTrue fact-check

ElephantSeal B+Limited coverage

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/851c8023-afa5-4b9a-8440-27bcccfc0b72.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72)
<a href="https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72"><img src="https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72.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/851c8023-afa5-4b9a-8440-27bcccfc0b72.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72)
<a href="https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72"><img src="https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72.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/851c8023-afa5-4b9a-8440-27bcccfc0b72.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72)
<a href="https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72"><img src="https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72.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/851c8023-afa5-4b9a-8440-27bcccfc0b72.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/radar.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72)
<a href="https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72"><img src="https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/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/851c8023-afa5-4b9a-8440-27bcccfc0b72/radar.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/radar.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/radar.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72)
<a href="https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72"><img src="https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/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/851c8023-afa5-4b9a-8440-27bcccfc0b72/radar.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/radar.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/radar.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72)
<a href="https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72"><img src="https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/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/851c8023-afa5-4b9a-8440-27bcccfc0b72/radar.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/radar.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/wide.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72)
<a href="https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72"><img src="https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/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/851c8023-afa5-4b9a-8440-27bcccfc0b72/wide.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/wide.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72
   :alt: pgTrue fact-check
   :width: 480
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/wide.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72)
<a href="https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72"><img src="https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/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/851c8023-afa5-4b9a-8440-27bcccfc0b72/wide.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/wide.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72
   :alt: pgTrue fact-check
   :width: 480
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/wide.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72)
<a href="https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72"><img src="https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/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/851c8023-afa5-4b9a-8440-27bcccfc0b72/wide.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/851c8023-afa5-4b9a-8440-27bcccfc0b72/wide.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72
   :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

Understand memory management in Amazon RDS for PostgreSQL to avoid out of memory | Amazon Web Services (opens in new tab)

aws.amazon.com
Check before you follow it: 4 claims are wrong.
1
inaccuracy
0
dangerous-recipe
3
misleading
3
imprecise
0
transcription
0
aged
0
withdrawn
11
verified-accurate

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

ReportTechnical fact-check, edition 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 1 time; see Revisions below. Policy: right-of-reply and corrections policy. pgTrue versionaudited with v1.0.14 (approx.) · regraded with v1.1.1 (approx.)

Inaccuracies

F3

Temporary-file logging records deletion rather than creation

INACCURATEFactual · holds up after review

Claim ledger

Article says
…every temporary file creation is logged…
What is true
log_temp_files emits the entry when PostgreSQL deletes the file. REL_17_4 src/backend/storage/file/fd.c:1524-1528 and config.sgml document that trigger. Matching timestamps can reflect matching cleanup times. They do not prove that sessions exceeded their budgets simultaneously.
So what
Correlate temporary-file logs with query intervals. Do not treat matching log timestamps as proof of simultaneous spill onset.
Charitable reading
Setting log_temp_files to zero does enable logging for all qualifying executor temporary files. The article assigns the wrong event time.

Source

Source · REL_17_4 · doc/src/sgml/config.sgml:7830-7852If enabled by this setting, a log entry is emitted for each temporary file, with the file size specified in bytes, when it is deleted.
In the article · section “RDS for PostgreSQL DB logs”

In the article

excerpt · section “RDS for PostgreSQL DB logs” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

RDS for PostgreSQL DB logs

Temp file logging: the work_mem exceeded indicator. With log_temp_files = 0 set in the parameter group, every temporary file creation is logged. When a hash join’s hash table exceeds work_mem x hash_mem_multiplier , or a sort exceeds work_mem , PostgreSQL writes the overflow to temporary files. Each temp file creation generates a log entry with the file path, size, and the full query text. During concurrent workloads, you see multiple backends spilling simultaneously, each identified by a unique PID, so you can correlate with pg_stat_activity and Enhanced Monitoring.

All sources and excerpts · 2
Evidence If enabled by this setting, a log entry is emitted for each temporary file, with the file size specified in bytes, when it is deleted.
Evidence/* * Called whenever a temporary file is deleted to report its size. */ static void ReportTemporaryFileUsage(const char *path, off_t size)
How the review tested this

Review: We tested whether creation merely meant eventual logging. The article also uses timestamps to infer simultaneous spills, so timing matters. We tested whether creation logging could mean delayed reporting. The surrounding article explicitly infers simultaneous budget exhaustion from matching timestamps. REL_17_4 logs deletion, so that timing inference fails.

Dangerous or recipe bugsNone in this edition.

Misleading / imprecise

F1

PostgreSQL 14 alone does not provide all demonstrated Aurora features

MISLEADINGApplicable · holds up after review

Claim ledger

Article says
…version 14 or higher recommended for full feature availability…
What is true
Aurora documents peak-memory tracking from 14.12, 15.7, and 16.3. It documents rds.enable_memory_management from 14.10 and corresponding later releases. PostgreSQL 14 without a minor-version requirement does not establish full feature availability.
So what
Require Aurora 14.12 or later for the demonstrated peak-memory features. Check the minor release before using rds.enable_memory_management.
Charitable reading
The demonstrations name Aurora 17.4, which supports these features. The prerequisite still recommends PostgreSQL 14 for full availability.

Source

Source · https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.BestPractices.memory.management.html| 12.17, 13.13, 14.10, 15.5, and higher versions | `rds.enable_memory_management` | `true` | `SET rds.enable_memory_management = false;` |
In the article · section “Prerequisites”

In the article

excerpt · section “Prerequisites” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

Prerequisites

An Amazon RDS for PostgreSQL or Amazon Aurora PostgreSQL-Compatible Edition DB instance (version 14 or higher recommended for full feature availability)

All sources and excerpts · 2
Evidence| 12.17, 13.13, 14.10, 15.5, and higher versions | `rds.enable_memory_management` | `true` | `SET rds.enable_memory_management = false;` |
EvidenceYou can monitor query peak memory usage in your DB instance to detect queries contributing to high database memory use from the following versions: + 16.3 and all higher versions + 15.7 and higher versions + 14.12 and higher versions
How the review tested this

Review: We tested whether the 17.4 examples resolve the prerequisite ambiguity. They do not supply the missing minor-version requirements. We tested whether the Aurora 17.4 examples resolve the prerequisite. They do not establish full availability throughout PostgreSQL 14. The documented minor-version requirements support the charge.

F7

The Balanced classification does not establish high memory use

MISLEADINGApplicable · holds up after review

Claim ledger

Article says
…Balanced Both planning and execution are memory-intensive…
What is true
The CASE expression compares peak ratios without an absolute byte threshold. Zero-byte planning and execution peaks both reach ELSE 'Balanced'. The label cannot establish that either phase consumes substantial memory. It cannot alone justify restructuring the schema.
So what
Add an absolute memory threshold before recommending schema changes for queries labeled Balanced.
Charitable reading
Balanced can describe a ratio between planning and execution peaks. It cannot establish that either peak is large.

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

In the article · section “Classifying queries: plan-heavy or execution-heavy”

In the article

excerpt · section “Classifying queries: plan-heavy or execution-heavy” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

Classifying queries: plan-heavy or execution-heavy

Profile Meaning Tuning Action Plan-heavy Query structure is complex (many joins, partitions, CTEs) Simplify the query, reduce partition count, or break into smaller steps Execution-heavy Query processes large data volumes at runtime Tune work_mem / hash_mem_multiplier at session level, add indexes, optimize joins Balanced Both planning and execution are memory-intensive Restructure the schema or materialize intermediate results
How the review tested this

Review: We evaluated both CASE predicates with zero peaks. Neither matches, and ranking ten queries supplies no absolute memory threshold. We evaluated both predicates at zero and at equal small peaks. Both cases return Balanced. Ranking by peak memory supplies no absolute threshold. The prescribed schema changes exceed what the classification establishes.

F15

Misleading: “…ORDER BY allocated DESC…”

MISLEADINGConsistent · partly holds after review

Claim ledger

Article says
…ORDER BY allocated DESC…
What is true
pg_size_pretty returns text in REL_17_4 src/include/catalog/pg_proc.dat:7502. ORDER BY allocated therefore sorts the formatted output instead of numeric bytes. The displayed ranking places 8,192 bytes before 40 MB. Sort the qualified numeric input before LIMIT 20. These records do not establish that the displayed text order is impossible.
So what
Alias aurora_stat_memctx_usage() as mu and use ORDER BY mu.allocated DESC before LIMIT 20.

Source

Source · REL_17_4 · src/include/catalog/pg_proc.dat:7500-7503proname => 'pg_size_pretty', prorettype => 'text', proargtypes => 'int8',
In the article · section “Memory context inspection”

In the article

excerpt · section “Memory context inspection” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

Memory context inspection

SELECT
    pid,
    name AS context_name,
    pg_size_pretty(allocated) AS allocated,
    pg_size_pretty(used) AS used,
    instances
FROM aurora_stat_memctx_usage()
WHERE pid = <suspect_pid>
ORDER BY allocated DESC
LIMIT 20;
postgres=> -- Session B (Aurora): Query memory contexts for the active backend
SELECT
pid,
name AS context_name,
pg_size_pretty(allocated) AS allocated,
pg_size_pretty(used) AS used,
instances
FROM aurora_stat_memctx_usage()
WHERE pid = 799
ORDER BY allocated DESC
LIMIT 20;

pid | context_name                | allocated | used      | instances
----+-----------------------------+-----------+-----------+-----------
799 | TZParserMemory              | -96 bytes | 0 bytes   | 0
799 | PortalMemory                | 8192 bytes| 536 bytes | 1
799 | Aurora File Context         | 8192 bytes| 5024 bytes| 1
799 | RowDescriptionContext       | 8192 bytes| 1304 bytes| 1
799 | HashSpillContext            | 8192 bytes| 272 bytes | 1
799 | smgr relation context       | 8192 bytes| 272 bytes | 1
799 | MdSmgr                      | 8192 bytes| 272 bytes | 1
799 | TopTransactionContext       | 8192 bytes| 576 bytes | 1
799 | printtup                    | 8192 bytes| 272 bytes | 1
799 | MessageContext              | 64 kB     | 45 kB     | 1
799 | ExecutorState               | 63 kB     | 37 kB     | 1
799 | RelCache hash table entries | 512 kB    | 286 kB    | 1
799 | CacheMemoryContext          | 512 kB    | 387 kB    | 1
799 | Catalog tuple context       | 512 kB    | 401 kB    | 1
799 | PortalHeapMemory            | 5072 bytes| 2960 bytes| 2
799 | ExprContext                 | 40 MB     | 39 MB     | 8
799 | TupleSort main              | 39 kB     | 28 kB     | 2
799 | Relation metadata           | 335 kB    | 258 kB    | 117
799 | TransactionAbortContext     | 32 kB     | 272 bytes | 1
799 | Miscellaneous               | 3133 kB   | 3099 kB   | 7
(20 rows)
All sources and excerpts · 1
Evidence proname => 'pg_size_pretty', prorettype => 'text', proargtypes => 'int8',
How the review tested this

Review: We tested text ordering as an explanation. E-44 establishes a text result, but no cited evidence establishes the collation. We checked whether ORDER BY uses the formatted output alias. It does, and E-44 confirms text output. The displayed allocation sequence also fails numeric descending order. Qualifying the numeric input corrects the ranking.

F2

Imprecise: “…the Sort node consumes minimal memory regardless of the result set size…”

IMPRECISEApplicable · partly holds after review

Claim ledger

Article says
…the Sort node consumes minimal memory regardless of the result set size…
What is true
Top-N heapsort limits retained rows, so increasing input row count need not increase retained memory. Tuple width still matters. REL_17_4 src/backend/utils/sort/tuplesort.c:1256 documents possible work_mem overruns when later tuples are larger. The article should qualify its minimal-memory claim.
So what
Measure retained row widths and actual sort memory before treating LIMIT as sufficient memory protection.

Source

Source · REL_17_4 · src/backend/utils/sort/tuplesort.c:1256-1259* Note that once we enter TSS_BOUNDED state we will always try to * complete the sort that way. In the worst case, if later input * tuples are larger than earlier ones, this might cause us to * exceed workMem significantly.
In the article · section “Estimating work_mem usage from the plan”

In the article

excerpt · section “Estimating work_mem usage from the plan” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

Estimating work_mem usage from the plan

LIMIT and the top-N heapsort optimization. When a LIMIT clause is present with ORDER BY , PostgreSQL uses a bounded top-N heapsort, maintaining only the top-N rows in a small in-memory heap. This means the Sort node consumes minimal memory regardless of the result set size. Note that the optimizer uses bounded heapsort only when the LIMIT is sufficiently small relative to total rows. For very large LIMIT values, it might still perform a full sort. Without LIMIT , the full result must be sorted, and if it exceeds work_mem , the sort spills to disk with Sort Method: external merge Disk . The key signal: temp_files > 0 in a query’s DBI metrics means that query ran out of allocated memory and spilled to disk. Cross-reference the number of hash and sort nodes in the plan with your current work_mem and hash_mem_multiplier settings to determine whether a session-level work_mem increase or a query optimization is the better fix.

All sources and excerpts · 1
Evidence * Note that once we enter TSS_BOUNDED state we will always try to * complete the sort that way. In the worst case, if later input * tuples are larger than earlier ones, this might cause us to * exceed workMem significantly.
How the review tested this

Review: We distinguished input row count from retained tuple width. E-17 challenges a byte guarantee, not bounded heapsort's row-count benefit. We checked the bounded-sort condition and the article's small-LIMIT qualification. REL_17_4 still permits significant memory overruns after bounded heapsort starts. The finding distinguishes algorithm selection from allocation size.

F5

Imprecise: “…t3 and t4g small instances on Aurora…”

IMPRECISEApplicable · partly holds after review

Claim ledger

Article says
…t3 and t4g small instances on Aurora…
What is true
Aurora documentation lists t3.medium, db.t3.large, db.t4g.medium, and db.t4g.large as huge-page exceptions (E-16). The article's phrase 'small instances' does not identify those sizes precisely. Check the exact instance class before applying its RES interpretation. Its later medium-class examples do not claim completeness.
So what
Check huge-page support for db.t3.large and db.t4g.large before interpreting RES as excluding shared_buffers.

Source

Source · https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Managing.html`Huge_pages` parameter is turned on by default for all DB instance classes other than t3.medium,db.t3.large,db.t4g.medium,db.t4g.large instance classes.
In the article · section “Understanding Resident Set Size (RES) in Enhanced Monitoring”

In the article

excerpt · section “Understanding Resident Set Size (RES) in Enhanced Monitoring” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

Understanding Resident Set Size (RES) in Enhanced Monitoring

Enhanced Monitoring shows Resident Set Size (RES) per process. This primarily reflects the physical memory attributed to each backend by the OS, though some portion (such as shared library pages) may be physically shared across processes. Both RDS for PostgreSQL and Aurora PostgreSQL have huge pages enabled by default (except micro, small, and medium instances on RDS, and t3 and t4g small instances on Aurora). When huge pages are enabled, shared_buffers is allocated using 2 MB pages and is not included in RES . This means a backend with noticeably higher RES than others (for example, hundreds of megabytes when others are in the tens of megabytes) is likely executing a memory-intensive query consuming large amounts of work_mem .

All sources and excerpts · 1
Evidence`Huge_pages` parameter is turned on by default for all DB instance classes other than t3.medium,db.t3.large,db.t4g.medium,db.t4g.large instance classes.
How the review tested this

Review: We tested 'small instances' as an informal description of burstable classes. The later passage gives examples, not an exhaustive list. E-16 supports requiring exact class names, but the categorical inaccuracy charge overstates the wording. We checked whether later medium-class examples correct the exception list. The documented large-class exceptions remain missing.

F6

Imprecise: “…max_parallel_workers_per_gather worker processes are launched…”

IMPRECISEFactual · partly holds after review

Claim ledger

Article says
…max_parallel_workers_per_gather worker processes are launched…
What is true
max_parallel_workers_per_gather sets the maximum workers for one Gather or Gather Merge node. E-22 and E-23 describe a ceiling, not a guaranteed launch count. The setting alone does not establish how many workers launched.
So what
Use Workers Planned and Workers Launched from the actual plan when estimating observed parallel-query memory.

Source

Source · REL_17_4 · doc/src/sgml/config.sgml:2768-2775Sets the maximum number of workers that can be started by a single <literal>Gather</literal> or <literal>Gather Merge</literal> node.
In the article · section “Local memory (per-backend)”

In the article

excerpt · section “Local memory (per-backend)” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

Local memory (per-backend)

Parallel queries: When the planner chooses a parallel plan, max_parallel_workers_per_gather worker processes are launched, each consuming its own work_mem . With 4 parallel workers, a single sort node can use up to 5x work_mem (1 leader plus 4 workers). max_parallel_workers limits the total parallel workers system-wide.

All sources and excerpts · 2
Evidence Sets the maximum number of workers that can be started by a single <literal>Gather</literal> or <literal>Gather Merge</literal> node.
Evidence {"max_parallel_workers_per_gather", PGC_USERSET, RESOURCES_ASYNCHRONOUS, gettext_noop("Sets the maximum number of parallel processes per executor node."),
How the review tested this

Review: E-22 and E-23 establish a maximum. Their recorded quotations do not establish the separate planner-choice and runtime-availability explanations.

Verified accurate

F8

Hash-operation budgets multiply work_mem by hash_mem_multiplier

ACCURATEFactual · holds up after review

Claim ledger

Article says
…the limit is work_mem x hash_mem_multiplier…
What is true
REL_17_4 src/backend/executor/nodeHash.c:3592-3613 computes work_mem × hash_mem_multiplier in bytes. Separate sort and hash operations can consume separate budgets. The article correctly distinguishes these budgets from a single per-query allocation.
Charitable reading
The statement describes the configured hash-operation budget. It does not establish an absolute process-memory ceiling.

Source

Source · REL_17_4 · src/backend/executor/nodeHash.c:3592-3613mem_limit = (double) work_mem * hash_mem_multiplier * 1024.0;
In the article · section “Local memory (per-backend)”

In the article

excerpt · section “Local memory (per-backend)” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

Local memory (per-backend)

Query operations (sort, hash): Controlled by work_mem . This value applies to each individual query execution node, not the query as a whole (see PostgreSQL documentation for work_mem ). A single query with multiple Sort or Hash nodes consumes work_mem independently for each node. For hash-based operations, the limit is work_mem x hash_mem_multiplier .

All sources and excerpts · 2
Evidence mem_limit = (double) work_mem * hash_mem_multiplier * 1024.0;
Evidence Note that a complex query might perform several sort and hash operations at the same time, with each operation generally being allowed to use as much memory as this value specifies before it starts to write data into temporary files. Also, several running sessions could be doing such operations concurrently.
How the review tested this

Review: We checked whether the finding promises a process-memory ceiling. It correctly confines verification to configured operation budgets. We checked whether the finding mistakes an operation budget for total process memory. It explicitly avoids that claim. REL_17_4 computes the documented product and permits concurrent operation budgets.

F9

Parallel maintenance does not multiply the command budget by worker count

ACCURATEFactual · holds up after review

Claim ledger

Article says
…a limit applied to the entire command regardless of the number of parallel workers…
What is true
PostgreSQL 14.0 and 17.4 documentation apply maintenance_work_mem to the parallel utility command. REL_17_4 src/backend/access/nbtree/nbtsort.c:1720 divides the worker sort budget among participants.
Charitable reading
The statement concerns the maintenance-operation budget, rather than every allocation made by its processes.

Source

Source · REL_17_4 · doc/src/sgml/config.sgml:2802-2838process. Parallel utility commands treat the resource limit <varname>maintenance_work_mem</varname> as a limit to be applied to the entire utility command, regardless of the number of parallel worker processes. However, parallel utility
In the article · section “Local memory (per-backend)”

In the article

excerpt · section “Local memory (per-backend)” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

Local memory (per-backend)

Maintenance operations (VACUUM, CREATE INDEX, and so on): Controlled by maintenance_work_mem . For parallel CREATE INDEX or parallel VACUUM, max_parallel_maintenance_workers controls the number of workers. Unlike parallel queries where each worker gets its own full work_mem , parallel utility commands treat maintenance_work_mem as a limit applied to the entire command regardless of the number of parallel workers. The total is shared, not multiplied. For parallel CREATE INDEX, workers share the sort memory. For parallel VACUUM, the leader collects dead tuple IDs within the maintenance_work_mem limit while workers process index cleanup.

All sources and excerpts · 3
Evidence process. Parallel utility commands treat the resource limit <varname>maintenance_work_mem</varname> as a limit to be applied to the entire utility command, regardless of the number of parallel worker processes. However, parallel utility
Evidence sortmem = maintenance_work_mem / btleader->nparticipanttuplesorts;
Evidence process. Parallel utility commands treat the resource limit <varname>maintenance_work_mem</varname> as a limit to be applied to the entire utility command, regardless of the number of parallel worker processes. However, parallel utility

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

How the review tested this

Review: We checked command budgets against worker allocations. Both documented versions agree, and nbtsort.c divides the sort budget among participants. We checked both release ranges and the participant division in nbtsort.c. They support command-level budgeting. The finding does not claim that every process allocation falls within maintenance_work_mem.

F10

pg_log_backend_memory_contexts sends context details to the server log

ACCURATEFactual · holds up after review

Claim ledger

Article says
…outputs memory context information to the PostgreSQL log…
What is true
pg_log_backend_memory_contexts requests logging for the specified process and returns Boolean. REL_17_4 doc/src/sgml/func.sgml:28158-28166 states that details appear at LOG level rather than in client results. PostgreSQL 14.0 documents the same behavior.
Charitable reading
The function returns a Boolean request result. The memory-context details appear in the server log.

Source

Source · REL_17_4 · doc/src/sgml/func.sgml:28158-28166Requests to log the memory contexts of the backend with the specified process ID. This function can send the request to backends and auxiliary processes except logger. These memory contexts will be logged at <literal>LOG</literal> message level. They will appear in the server log based on the log configuration set (see <xref linkend="runtime-config-logging"/> for more information), but will not be sent to the client regardless of <xref linkend="guc-client-min-messages"/>.
In the article · section “Local memory (per-backend)”

In the article

excerpt · section “Local memory (per-backend)” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

Local memory (per-backend)

Amazon RDS for PostgreSQL provides pg_log_backend_memory_contexts(pid) , which outputs memory context information to the PostgreSQL log. Note that this function writes to the log file rather than returning results directly, so there is a slight delay compared to the aurora_stat_memctx_usage() function on Aurora, which returns results as a queryable set in real time.

All sources and excerpts · 4
Evidence Requests to log the memory contexts of the backend with the specified process ID. This function can send the request to backends and auxiliary processes except logger. These memory contexts will be logged at <literal>LOG</literal> message level. They will appear in the server log based on the log configuration set (see <xref linkend="runtime-config-logging"/> for more information), but will not be sent to the client regardless of <xref linkend="guc-client-min-messages"/>.
Evidence{ oid => '4543', descr => 'log memory contexts of the specified backend', proname => 'pg_log_backend_memory_contexts', provolatile => 'v', prorettype => 'bool', proargtypes => 'int4', prosrc => 'pg_log_backend_memory_contexts' },
Evidence Requests to log the memory contexts of the backend with the specified process ID. These memory contexts will be logged at <literal>LOG</literal> message level. They will appear in

Version note: The logging function also exists at the PostgreSQL 14 floor.

Evidence will be logged at <literal>LOG</literal> message level. They will appear in the server log based on the log configuration set (see <xref linkend="runtime-config-logging"/> for more information), but will not be sent to the client regardless of <xref linkend="guc-client-min-messages"/>.
How the review tested this

Review: We distinguished the Boolean return from memory-context details. The catalog and both documentation versions support that distinction. We checked whether the Boolean return contradicts the article's logging description. It does not. Both release documents distinguish server-log details from client results.

F11

SET LOCAL confines the memory setting to the transaction

ACCURATEFactual · holds up after review

Claim ledger

Article says
…SET LOCAL is preferred to limit scope to a single transaction.
What is true
SET LOCAL expires when the current transaction ends, whether it commits or aborts. REL_17_4 doc/src/sgml/ref/set.sgml:55-56 confirms the example's transaction scope.
Charitable reading
The example places SET LOCAL inside an explicit transaction.

Source

Source · REL_17_4 · doc/src/sgml/ref/set.sgml:55-56The effects of <command>SET LOCAL</command> last only till the end of the current transaction, whether committed or not. A special case is
In the article · section “1. Set work_mem at session/transaction level”

In the article

excerpt · section “1. Set work_mem at session/transaction level” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

1. Set work_mem at session/transaction level

SET LOCAL is preferred to limit scope to a single transaction.

All sources and excerpts · 1
Evidence The effects of <command>SET LOCAL</command> last only till the end of the current transaction, whether committed or not. A special case is
How the review tested this

Review: We checked for an absent transaction block and an unsupported sizing endorsement. The example includes BEGIN, and verification concerns scope. We checked transaction boundaries and abort behavior. The example uses an explicit transaction. REL_17_4 confirms that SET LOCAL ends with that transaction.

F12

Aurora documents allocation-triggered cancellation under critical memory pressure

ACCURATEFactual · holds up after review

Claim ledger

Article says
…cancel transactions that are requesting memory allocations before the OOM killer is invoked…
What is true
Aurora documentation describes canceling transactions that request memory under critical pressure. It documents rds.enable_memory_management as enabled by default for the applicable releases. The article's 17.4 example falls within that release scope.
Charitable reading
The article explicitly warns that rapid concurrent allocations can defeat the protection.

Source

Source · https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.BestPractices.memory.management.html| 12.17, 13.13, 14.10, 15.5, and higher versions | `rds.enable_memory_management` | `true` | `SET rds.enable_memory_management = false;` |
In the article · section “Preventing OOM with rds.enable_memory_management”

In the article

excerpt · section “Preventing OOM with rds.enable_memory_management” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

Preventing OOM with rds.enable_memory_management

Aurora PostgreSQL includes rds.enable_memory_management (enabled by default) which is designed to monitor memory pressure and cancel transactions that are requesting memory allocations before the OOM killer is invoked. When critical memory pressure is detected, the offending transaction receives:

ERROR: out of memory
DETAIL: Failed on request of size <N>.
All sources and excerpts · 2
Evidence| 12.17, 13.13, 14.10, 15.5, and higher versions | `rds.enable_memory_management` | `true` | `SET rds.enable_memory_management = false;` |
Evidence+ Cancelling database transactions that request more memory when the system is approaching critical memory pressure.
How the review tested this

Review: We tested whether verification implies guaranteed OOM prevention. The finding verifies cancellation behavior and default settings, not guaranteed protection. We tested whether the finding certifies guaranteed OOM prevention. It certifies the documented mechanism and default. The article separately acknowledges cancellation timing failures.

F13

Aurora disables ANALYZE plan capture by default

ACCURATEFactual · holds up after review

Claim ledger

Article says
…captures the plan with EXPLAIN ANALYZE on the first execution of each new plan…
What is true
The Aurora parameter reference gives aurora_stat_plans.with_analyze a default of off. Enabling it includes actual runtime statistics when Aurora first captures a plan.
Charitable reading
The passage describes default capture behavior. Separate settings allow later plan recapture.

Source

Source · https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Monitoring.Query.Plans.htmlControls the EXPLAIN plan with ANALYZE. This mode is only used the first time a plan is captured. The allowed values are `on` and `off`. The default is `off`.
In the article · section “CloudWatch Database Insights”

In the article

excerpt · section “CloudWatch Database Insights” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

CloudWatch Database Insights

This is because the parameter aurora_stat_plans.with_analyze defaults to off . When set to on , Aurora captures the plan with EXPLAIN ANALYZE on the first execution of each new plan, which would include runtime statistics like Batches and Memory Usage . However, this adds execution overhead and is only captured once per plan. See the Aurora PostgreSQL query plan monitoring documentation for details.

All sources and excerpts · 1
EvidenceControls the EXPLAIN plan with ANALYZE. This mode is only used the first time a plan is captured. The allowed values are `on` and `off`. The default is `off`.
How the review tested this

Review: We checked first capture against an unconditional claim about every execution. The finding preserves the documented first-capture condition. We checked the quotation's surrounding condition. The article explicitly requires with_analyze = on. E-35 confirms both the off default and first-capture behavior.

F14

Connection pooling reduces connection memory overhead

ACCURATEFactual · holds up after review

Claim ledger

Article says
…reducing and stabilizing the connection count directly reduces the memory baseline…
What is true
RDS Proxy pools and reuses database connections. Aurora guidance documents incremental memory costs for connections. Reducing backend connections reduces that component of memory consumption.
Charitable reading
The recommendation reduces connection overhead. It does not promise to bound active query allocations.

Source

Source · https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.htmlRDS Proxy establishes a database connection pool and reuses connections in this pool. This approach avoids the memory and CPU overhead of opening a new database connection each time.
In the article · section “4. Use connection pooling to stabilize backend connections”

In the article

excerpt · section “4. Use connection pooling to stabilize backend connections” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

4. Use connection pooling to stabilize backend connections

Because local memory consumption scales linearly with the number of backend connections, reducing and stabilizing the connection count directly reduces the memory baseline. Connection poolers like Amazon RDS Proxy and PgBouncer pool and reuse database connections, keeping the number of active backends predictable. This makes total local memory consumption more stable and easier to capacity-plan, reducing the risk of unexpected memory spikes from connection surges.

All sources and excerpts · 2
EvidenceRDS Proxy establishes a database connection pool and reuses connections in this pool. This approach avoids the memory and CPU overhead of opening a new database connection each time.
EvidenceEach connection to the DB cluster consumes incremental amounts of these resources, such as memory and CPU.
How the review tested this

Review: We tested whether pooling guarantees bounded query memory. The finding verifies only reduced connection overhead. We tested whether pooling guarantees bounded query memory or linear total memory. The finding asserts neither. E-37 and E-38 support reducing the connection-overhead component.

F16

The stated operation budgets total 20 MB

ACCURATEFactual · holds up after review

Claim ledger

Article says
…(2 x 4MB x 2.0) + (1 x 4MB) = 20MB per execution…
What is true
Two hash budgets consume 16 MB. One sort budget adds 4 MB. Their stated budget totals 20 MB. PostgreSQL 17.4 documents the work_mem × hash_mem_multiplier calculation.
Charitable reading
The example estimates operation budgets, not measured total backend memory.

Source

Source · REL_17_4 · doc/src/sgml/config.sgml:1833-1870memory limit for a hash table is computed by multiplying <varname>work_mem</varname> by <varname>hash_mem_multiplier</varname>.
In the article · section “Estimating work_mem usage from the plan”

In the article

excerpt · section “Estimating work_mem usage from the plan” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

Estimating work_mem usage from the plan

= (2 x 4MB x 2.0) + (1 x 4MB) = 20MB per execution
Parallel memory = (workers + 1) x per_node_allocation
All sources and excerpts · 1
Evidence memory limit for a hash table is computed by multiplying <varname>work_mem</varname> by <varname>hash_mem_multiplier</varname>.
How the review tested this

Review: We recalculated 2 × 4 × 2 + 4 = 20 MB. Verification concerns operation budgets, not measured process memory. We recalculated the stated budgets: 2 × 4 MB × 2 + 4 MB = 20 MB. The finding expressly limits accuracy to those assumptions. It does not certify measured backend memory.

F17

Verified accurate: “…rows=500529 loops=1)…”

ACCURATEFactual · partly holds after review

Claim ledger

Article says
…rows=500529 loops=1)…
What is true
Both displayed scans account for 1 million rows. The first totals 500,529 returned rows plus 499,471 filtered rows. The second totals 600,537 returned rows plus 399,463 filtered rows.

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)…rows=500529 loops=1)…
How the review tested this

Review: Both sums equal 1 million rows. The cited spans contain counts, not predicates, so they do not establish the causal explanation.

F18

The shared-buffer totals reconcile across the plan

ACCURATEFactual · holds up after review

Claim ledger

Article says
…Buffers: shared hit=43175, temp read=13178 written=13197…
What is true
The parent reports 43,175 shared-buffer hits. Its children account for that total (derived: 34482 + 8693). Both displayed plans preserve this relationship.
Charitable reading
Parent buffer counters include child activity. Adding every plan node would count activity repeatedly.

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)…Buffers: shared hit=43175, temp read=13178 written=13197…
How the review tested this

Review: We recalculated 34,482 + 8,693 = 43,175 shared-buffer hits and checked the corresponding second-plan counters. We checked both displayed plans and recalculated 34,482 + 8,693 = 43,175 buffer hits. The finding avoids adding inclusive parent counters repeatedly. Its arithmetic survives.

F19

Verified accurate: “…a single sort node can use up to 5x work_mem…”

ACCURATEFactual · partly holds after review

Claim ledger

Article says
…a single sort node can use up to 5x work_mem…
What is true
PostgreSQL 17.4 documentation says a parallel query using four workers may consume five times the memory of a query using none. E-56 supports the article's possible fivefold resource estimate.

Source

Source · REL_17_4 · doc/src/sgml/config.sgml:2760-2800For example, a parallel query using 4 workers may use up to 5 times as much CPU time, memory, I/O bandwidth, and so forth as a query which uses no workers at all.
In the article · section “Local memory (per-backend)”

In the article

excerpt · section “Local memory (per-backend)” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

Local memory (per-backend)

Parallel queries: When the planner chooses a parallel plan, max_parallel_workers_per_gather worker processes are launched, each consuming its own work_mem . With 4 parallel workers, a single sort node can use up to 5x work_mem (1 leader plus 4 workers). max_parallel_workers limits the total parallel workers system-wide.

All sources and excerpts · 1
Evidence For example, a parallel query using 4 workers may use up to 5 times as much CPU time, memory, I/O bandwidth, and so forth as a query which uses no workers at all.
How the review tested this

Review: E-56 supports possible fivefold query resource demand. Its recorded quotation does not specify individual sort allocations or participating-leader behavior.

Notes

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

Note: “Temp file sizes tell you how much data overflowed beyond the hash budget.”

NOTEpartly holds after review

Claim ledger

Article says
Temp file sizes tell you how much data overflowed beyond the hash budget.
What is true
Temporary-file sizes measure spilled file bytes. They do not directly measure additional RAM needed to avoid batching. REL_17_4 src/backend/executor/nodeHashjoin.c:491 and :1344 show outer-batch storage and tuple serialization. This qualifies the article's description without establishing that it recommends adding spill bytes to work_mem.
So what
Use EXPLAIN memory and batch statistics, then test a session-level budget. Do not add spill-file bytes to the hash budget.

Source

Source · REL_17_4 · src/backend/executor/nodeHashjoin.c:482-502* Need to postpone this outer tuple to a later batch. * Save it in the corresponding outer-batch file.

Not graded: no reader would act differently on it.

In the article · section “RDS for PostgreSQL DB logs”

In the article

excerpt · section “RDS for PostgreSQL DB logs” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

RDS for PostgreSQL DB logs

From the preceding output, you can draw three conclusions. Multiple PIDs at the same timestamp confirm that concurrent sessions are all exceeding their work_mem budgets simultaneously (aggregate memory pressure). Temp file sizes tell you how much data overflowed beyond the hash budget. The STATEMENT: line identifies the exact query without needing to cross-reference pg_stat_activity .

All sources and excerpts · 2
Evidence * Need to postpone this outer tuple to a later batch. * Save it in the corresponding outer-batch file.
Evidence BufFileWrite(file, &hashvalue, sizeof(uint32)); BufFileWrite(file, tuple, tuple->t_len);
How the review tested this

Review: We read data overflow as disk spill volume. The article does not explicitly equate that volume with additional required RAM. E-4 describes spilled data. It does not instruct readers to add file bytes to RAM budgets. E-20 and E-21 support that caveat, but cannot justify attributing the stronger claim.

More in this report

Section checks · 14 sections

Section checks

AspectGradeFindingsCoverage
PrerequisitesB+1 misleading1 checked · 1 need data we do not have
Local memoryA1 verified-accurate71% of claims (5 of 7, plus 6 that need data we do not have)
Operation limitsA1 imprecise · 3 verified-accurate83% of claims (15 of 18)
Resident memoryA1 imprecise100% of claims (4 of 4, plus 7 that need data we do not have)
Plan viewerA1 verified-accurate100% of claims (5 of 5, plus 1 that need data we do not have)
EXPLAIN examplesA2 verified-accurate77% of claims (7 of 9, plus 11 that need data we do not have)
Estimating query memoryA1 verified-accurate66% of claims (4 of 6)
LIMIT and sortingA1 imprecise50% of claims (3 of 6)provisional
Temporary file logsB+1 inaccuracy50% of claims (3 of 6, plus 2 that need data we do not have)provisional
Memory contextsB+1 misleading62% of claims (5 of 8, plus 10 that need data we do not have)
Memory profilesB+1 misleading100% of claims (3 of 3, plus 5 that need data we do not have)
Aurora OOM preventionA1 verified-accurate100% of claims (2 of 2, plus 6 that need data we do not have)
Immediate actionsA1 verified-accurate71% of claims (5 of 7, plus 2 that need data we do not have)
Connection poolingA1 verified-accurate100% of claims (1 of 1)
Coverage and assessment · Checked 86 of 123 Postgres claims across 31 sections; 4 sections below half

B+ — the findings address the article's main subject. What we did not check is listed below. The findings directly check work_mem budgeting, diagnostic queries, logging, connection pooling, and Aurora memory protection.

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

What we did not check

  • We did not reproduce the displayed query plans, memory measurements, graphs, or OOM incident.
  • We did not verify Aurora function signatures, identifier uniqueness, or the memory statistics shown in the examples.
  • We did not verify Linux RES and VIRT accounting or the monitoring services' implementations.
  • We did not verify engine-specific shared_buffers defaults or the complete set of RDS memory-protection features.
  • We did not check every context name, crash-recovery step, or workload-specific tuning recommendation.
  • We did not verify Aurora's internal cancellation timing or background-process protection.
  • We did not establish whether documentation changed between August 19 and October 19, 2026.
  • We did not verify the claimed absence of memory protection and peak-memory tracking from RDS for PostgreSQL.
  • We did not check every PostgreSQL allocator, executor, and logging claim.
  • We did not inspect the article's figures or original session records.
  • We did not read Figures 1–6 as numerical data.
  • We did not verify the allocation mechanisms behind the memory estimates.
  • We did not establish that the OOM log came from the printed 15-session workload.
  • Safe: we did not complete every applicable check.
  • Section “LIMIT and sorting”: we checked 3 of 6 checkable claims.
  • Section “Temporary file logs”: we checked 3 of 8 checkable claims.
  • Section “Introduction”: we checked 0 of 6 checkable claims.
  • Section “Connections”: we checked 3 of 7 checkable claims.
  • Section “Database Insights”: we checked 0 of 3 checkable claims.
  • Section “Active-query correlation”: we checked 0 of 3 checkable claims.
  • Section “OOM detection”: we checked 0 of 6 checkable claims.
  • We could not decide whether the article contains a material benchmark.
  • We could not decide whether the article depends on finding F3.
Checked 86 of 123 Postgres claims across 31 sections; 4 sections below half
  • Introduction: 0 of 4 Postgres claims checked, plus 2 that need data we do not have; not counted: 2 product or opinion, 3 not a claim; not checked: 4 for other reasons
  • Prerequisites: 1 checked, plus 1 that need data we do not have; not counted: 3 product or opinion, 1 not a claim
  • Memory architecture: 5 of 7 Postgres claims checked, plus 1 that need data we do not have; not counted: 2 product or opinion, 1 duplicate; not checked: 2 for other reasons
  • Shared memory: 12 of 16 Postgres claims checked, plus 10 that need data we do not have; not counted: 1 duplicate; not checked: 4 for other reasons
  • Local memory: 5 of 7 Postgres claims checked, plus 6 that need data we do not have; not counted: 1 duplicate; not checked: 2 for other reasons
  • Operation limits: 15 of 18 Postgres claims checked; not counted: 2 duplicate; not checked: 3 for other reasons
  • Connections: 3 of 6 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 product or opinion, 1 duplicate; not checked: 3 for other reasons
  • Resident memory: 4 of 4 Postgres claims checked, plus 7 that need data we do not have; not counted: 1 product or opinion
  • OOM troubleshooting: no checkable claims; not counted: 1 duplicate, 1 not a claim
  • Memory pressure signals: 3 claims are the author's own account; nothing checkable; not counted: 4 product or opinion
  • Memory pressure demonstration: 6 claims are the author's own account; nothing checkable
  • Database Insights: 0 of 2 Postgres claims checked, plus 1 that need data we do not have; not counted: 7 product or opinion; not checked: 2 for other reasons
  • Plan viewer: 5 of 5 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 product or opinion
  • EXPLAIN examples: 7 of 9 Postgres claims checked, plus 11 that need data we do not have; not checked: 2 for other reasons
  • Estimating query memory: 4 of 6 Postgres claims checked; not counted: 3 duplicate; not checked: 2 for other reasons
  • LIMIT and sorting: 3 of 6 Postgres claims checked; not checked: 3 for other reasons
  • Temporary file logs: 3 of 6 Postgres claims checked, plus 2 that need data we do not have; not counted: 1 product or opinion, 1 duplicate; not checked: 3 for other reasons
  • Memory contexts: 5 of 8 Postgres claims checked, plus 10 that need data we do not have; not counted: 2 duplicate; not checked: 3 for other reasons
  • Process monitoring: 1 of 1 Postgres claims checked, plus 6 that need data we do not have; not counted: 1 product or opinion, 2 duplicate
  • Peak memory tracking: 3 of 3 Postgres claims checked, plus 10 that need data we do not have
  • Memory profiles: 3 of 3 Postgres claims checked, plus 5 that need data we do not have
  • Active-query correlation: 0 of 1 Postgres claims checked, plus 2 that need data we do not have; not counted: 1 not a claim; not checked: 1 for other reasons
  • OOM demonstration: 3 claims are the author's own account; nothing checkable; not counted: 1 duplicate
  • OOM detection: 0 of 1 Postgres claims checked, plus 5 that need data we do not have; not counted: 1 product or opinion; not checked: 1 for other reasons
  • Aurora OOM prevention: 2 of 2 Postgres claims checked, plus 6 that need data we do not have
  • Immediate actions: 5 of 7 Postgres claims checked, plus 2 that need data we do not have; not counted: 2 duplicate; not checked: 2 for other reasons
  • Connection pooling: 1 of 1 Postgres claims checked; not counted: 2 product or opinion, 1 duplicate
  • Limitations: 4 claims are the author's own account; nothing checkable; not counted: 1 product or opinion, 4 duplicate
  • Engine comparison: 1 claim is the author's own account; nothing checkable; not counted: 1 product or opinion, 10 duplicate, 1 not a claim
  • Conclusion: no checkable claims; not counted: 6 duplicate, 2 not a claim
  • Authors: no checkable claims; not counted: 2 not a claim

Average of 4 axes: 3.48 · 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 18 checked · 1 caveat. Applicable B+ · 2 wrong of 14 checked · 2 caveats. Consistent B+ · 1 wrong of 18 checked · 0 caveats. Transparent A · 0 wrong of 7 checked · 0 caveats. Safe not applicable (n/a). B+ 1 wrong of 18 checked · 1 caveatFactual B+1 wrong of 181 caveat B+ 2 wrong of 14 checked · 2 caveatsApplicable B+2 wrong of 142 caveats B+ 1 wrong of 18 checked · 0 caveatsConsistent B+1 wrong of 180 caveats A 0 wrong of 7 checked · 0 caveatsTransparent A0 wrong of 70 caveats not applicable (n/a), nothing to checkSafe n/anothingto check

By topic: Prerequisites — 1 finding, 1 wrong · Local memory — 1 finding, 0 wrong · Operation limits — 4 findings, 0 wrong · Resident memory — 1 finding, 0 wrong · Plan viewer — 1 finding, 0 wrong · EXPLAIN examples — 2 findings, 0 wrong · Estimating query memory — 1 finding, 0 wrong · LIMIT and sorting — 1 finding, 0 wrong · Temporary file logs — 1 finding, 1 wrong · Memory contexts — 1 finding, 1 wrong · Memory profiles — 1 finding, 1 wrong · Aurora OOM prevention — 1 finding, 0 wrong · Immediate actions — 1 finding, 0 wrong · Connection pooling — 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 18 claims, 32 commands scanned.

AxisLetterWrongCaveatsCheckedCoverage
FactualB+1118assessed: B+ · 1 wrong of 18 checked · 1 caveat
ApplicableB+2214assessed: B+ · 2 wrong of 14 checked · 2 caveats
ConsistentB+1018assessed: B+ · 1 wrong of 18 checked · 0 caveats
TransparentA007assessed: A · 0 wrong of 7 checked · 0 caveats
Safe—000partly assessed
Topics · 14 topics

Topics

TopicFactualApplicableConsistentTransparentSafe
Prerequisites0 issues 1 checked1 issue 1 checked F10 issues 1 checked0 issues 1 checked
Local memory0 issues 1 checked F100 issues 1 checked0 issues 1 checked
Operation limits1 issue 4 checked F6 F8 F9 F190 issues 3 checked0 issues 4 checked0 issues 1 checked
Resident memory0 issues 1 checked1 issue 1 checked F50 issues 1 checked0 issues 1 checked
Plan viewer0 issues 1 checked F130 issues 1 checked0 issues 1 checked0 issues 1 checked
EXPLAIN examples0 issues 2 checked F17 F180 issues 2 checked
Estimating query memory0 issues 1 checked F160 issues 1 checked0 issues 1 checked
LIMIT and sorting0 issues 1 checked1 issue 1 checked F20 issues 1 checked
Temporary file logs1 issue 1 checked F30 issues 1 checked0 issues 1 checked
Memory contexts0 issues 1 checked0 issues 1 checked1 issue 1 checked F15
Memory profiles0 issues 1 checked1 issue 1 checked F70 issues 1 checked
Aurora OOM prevention0 issues 1 checked F120 issues 1 checked0 issues 1 checked0 issues 1 checked
Immediate actions0 issues 1 checked F110 issues 1 checked0 issues 1 checked
Connection pooling0 issues 1 checked F140 issues 1 checked0 issues 1 checked0 issues 1 checked

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

Revisions: 2 · C- -> B+

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

  1. Revision 1 · 2026-09-06 16:40 UTC · C- · audit version not recorded · regrade version not recorded

    Article as first submitted. 17 accurate · 10 wrong · 16 caveats.

    ElephantSeal: C-.

    Changes: First audit. Open: F1 “You can see the full breakdown using the pg_shmem_allocations system view (PostgreSQL 14+).” (false); F3 “…LOG: terminating any other active server processes LOG: database system is shut down FATAL: the database system is in recovery mode…” (false); F9 “…WHERE pid = 799 ORDER BY allocated DESC LIMIT 20;…” (false); F10 “…This gives you a ranked list of backends by total memory consumption, a quick way to find the memory culprit during an incident.” (misleading); F11 “…Highest memory consumed during execution – hash tables, sort buffers, aggregation state at their peak. Primary driver of OOM risk.” (misleading); F12 “…we ran 15 concurrent sessions with work_mem = 1 GB sorting 30 million rows on Aurora PostgreSQL 17.4 (db.r7g.large, 16 GB)…” (misleading); F26 “These unbounded contexts rarely require intervention. They are managed internally by…” (misleading); F37 “…RESET max_parallel_workers_per_gather;…” (misleading); F45 “…for example, 102 GB on this db.r7g.large instance…” (misleading); F59 “…1754 MB…” (misleading); F2 “With log_temp_files = 0 set in the parameter group, every temporary file creation is logged.” (mostly accurate); F4 “Signal 9 ( SIGKILL ) is sent by the Linux OOM killer when the system runs out of available memory.” (mostly accurate); F5 “…ERROR: out of memory DETAIL: Failed on request of size <N>.” (mostly accurate); F6 “Note that the optimizer uses bounded heapsort only when the LIMIT is sufficiently small relative to total rows. For very large LIMIT values, it might…” (mostly accurate); F7 “…Buckets: 262144 Batches: 1 Memory Usage: 18289kB…” (mostly accurate); F8 “…RESET enable_mergejoin; RESET enable_nestloop; RESET max_parallel_workers_per_gather; SET SET SET SET…” (mostly accurate); F13 “As shown in the preceding OOM scenario, without this feature ( rds.enable_memory_management = off ), excessive memory consumption leads to the OOM killer terminating PostgreSQL…” (mostly accurate); F14 “…(except micro, small, and medium instances on RDS, and t3 and t4g small instances on Aurora)…” (mostly accurate); F16 “…When the planner chooses a parallel plan, max_parallel_workers_per_gather worker processes are launched, each consuming its own work_mem . With 4 parallel workers, a single sort…” (mostly accurate); F23 “…Memory context inspection pg_log_backend_memory_contexts() (log output) aurora_stat_memctx_usage() (real-time query)…” (mostly accurate); F24 “…while platform processes ( rdsadmin , Aurora runtime) show 40–100 MB…” (mostly accurate); F25 “On Aurora, every backend shows a large VIRT (for example, 102 GB on this db.r7g.large instance) because shared_buffers is mapped into each process’s address space.” (mostly accurate); F28 “…-- Transaction-scoped (reverts automatically at COMMIT)…” (mostly accurate); F38 “…LOG: database system is shut down…” (mostly accurate); F60 “…WHEN max_exec_peakmem > max_plan_peakmem * 2 THEN 'Execution-heavy'…” (mostly accurate); F61 “FreeableMemory (blue) plummeted from approximately 4 GB to under 20…” (mostly accurate).

  2. Revision 2 · this page · 2026-10-19 06:26 UTC · B+ · audited with v1.0.14 (approx.) · regraded with v1.1.1 (approx.)

    Same article text, re-audited. 11 accurate · 4 wrong · 3 caveats.

    ElephantSeal: B+.

    Changes: No longer reported: “You can see the full breakdown using the pg_shmem_allocations system view (PostgreSQL 14+).”; “…LOG: terminating any other active server processes LOG: database system is shut down FATAL: the database system is in recovery mode…”; “…WHERE pid = 799 ORDER BY allocated DESC LIMIT 20;…”; “…This gives you a ranked list of backends by total memory consumption, a quick way to find the memory culprit during an incident.”; “…Highest memory consumed during execution – hash tables, sort buffers, aggregation state at their peak. Primary driver of OOM risk.”; “…we ran 15 concurrent sessions with work_mem = 1 GB sorting 30 million rows on Aurora PostgreSQL 17.4 (db.r7g.large, 16 GB)…”; “These unbounded contexts rarely require intervention. They are managed internally by…”; “…RESET max_parallel_workers_per_gather;…”; “…for example, 102 GB on this db.r7g.large instance…”; “…1754 MB…”; “With log_temp_files = 0 set in the parameter group, every temporary file creation is logged.”; “Signal 9 ( SIGKILL ) is sent by the Linux OOM killer when the system runs out of available memory.”; “…ERROR: out of memory DETAIL: Failed on request of size <N>.”; “Note that the optimizer uses bounded heapsort only when the LIMIT is sufficiently small relative to total rows. For very large LIMIT values, it might…”; “…Buckets: 262144 Batches: 1 Memory Usage: 18289kB…”; “…RESET enable_mergejoin; RESET enable_nestloop; RESET max_parallel_workers_per_gather; SET SET SET SET…”; “As shown in the preceding OOM scenario, without this feature ( rds.enable_memory_management = off ), excessive memory consumption leads to the OOM killer terminating PostgreSQL…”; “…(except micro, small, and medium instances on RDS, and t3 and t4g small instances on Aurora)…”; “…When the planner chooses a parallel plan, max_parallel_workers_per_gather worker processes are launched, each consuming its own work_mem . With 4 parallel workers, a single sort…”; “…Memory context inspection pg_log_backend_memory_contexts() (log output) aurora_stat_memctx_usage() (real-time query)…”; “…while platform processes ( rdsadmin , Aurora runtime) show 40–100 MB…”; “On Aurora, every backend shows a large VIRT (for example, 102 GB on this db.r7g.large instance) because shared_buffers is mapped into each process’s address space.”; “…-- Transaction-scoped (reverts automatically at COMMIT)…”; “…LOG: database system is shut down…”; “…WHEN max_exec_peakmem > max_plan_peakmem * 2 THEN 'Execution-heavy'…”; “FreeableMemory (blue) plummeted from approximately 4 GB to under 20…”. New: F3 “Temporary-file logging records deletion rather than creation” (false); F1 “PostgreSQL 14 alone does not provide all demonstrated Aurora features” (misleading); F7 “The Balanced classification does not establish high memory use” (misleading); F15 “…ORDER BY allocated DESC…” (misleading); F2 “…the Sort node consumes minimal memory regardless of the result set size…” (mostly accurate); F5 “…t3 and t4g small instances on Aurora…” (mostly accurate); F6 “…max_parallel_workers_per_gather worker processes are launched…” (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: Understand memory management in Amazon RDS for PostgreSQL to avoid out of memory \| Amazon Web Services

Article title: Understand memory management in Amazon RDS for PostgreSQL to avoid out of memory \| Amazon Web Services
Article URL: https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory
Report URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72
Audited revision: 2 of 2, 2026-10-19 06:26:25 UTC
Overall letter: B+

## Axes

- Factual: B+ · 1 wrong · 18 checked · 1 caveats · assessed
- Applicable: B+ · 2 wrong · 14 checked · 2 caveats · assessed
- Consistent: B+ · 1 wrong · 18 checked · 0 caveats · assessed
- Transparent: A · 0 wrong · 7 checked · 0 caveats · assessed
- Safe: — · 0 wrong · 0 checked · 0 caveats · partly assessed

ElephantSeal: B+.

## Report metadata

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

## Findings needing a change (7)

### F3 · Inaccurate · Factual · Temporary-file logging records deletion rather than creation
Location: excerpt · section “RDS for PostgreSQL DB logs” · as fetched 2026-10-19 · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=every%20temporary%20file%20creation%20is%20logged)
Article says:
```text
…every temporary file creation is logged…
```
What is true:
log_temp_files emits the entry when PostgreSQL deletes the file. REL_17_4 src/backend/storage/file/fd.c:1524-1528 and config.sgml document that trigger. Matching timestamps can reflect matching cleanup times. They do not prove that sessions exceeded their budgets simultaneously.
So what:
Correlate temporary-file logs with query intervals. Do not treat matching log timestamps as proof of simultaneous spill onset.
Charitable reading:
Setting log_temp_files to zero does enable logging for all qualifying executor temporary files. The article assigns the wrong event time.
Review: We tested whether creation merely meant eventual logging. The article also uses timestamps to infer simultaneous spills, so timing matters. We tested whether creation logging could mean delayed reporting. The surrounding article explicitly infers simultaneous budget exhaustion from matching timestamps. REL_17_4 logs deletion, so that timing inference fails.

Sources:
- [REL_17_4 · doc/src/sgml/config.sgml:7830-7852](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/doc/src/sgml/config.sgml#L7830-L7852)
  Excerpt:
  ```text
  If enabled by this setting, a log entry is emitted for each
        temporary file, with the file size specified in bytes, when it is deleted.
  ```
- [REL_17_4 · src/backend/storage/file/fd.c:1524-1528](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/src/backend/storage/file/fd.c#L1524-L1528)
  Excerpt:
  ```text
  /*
 * Called whenever a temporary file is deleted to report its size.
 */
static void
ReportTemporaryFileUsage(const char *path, off_t size)
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F3

### F1 · Misleading · Applicable · PostgreSQL 14 alone does not provide all demonstrated Aurora features
Location: excerpt · section “Prerequisites” · as fetched 2026-10-19 · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=version%2014%20or%20higher%20recommended%20for%20full%20feature%20availability)
Article says:
```text
…version 14 or higher recommended for full feature availability…
```
What is true:
Aurora documents peak-memory tracking from 14.12, 15.7, and 16.3. It documents rds.enable_memory_management from 14.10 and corresponding later releases. PostgreSQL 14 without a minor-version requirement does not establish full feature availability.
So what:
Require Aurora 14.12 or later for the demonstrated peak-memory features. Check the minor release before using rds.enable_memory_management.
Charitable reading:
The demonstrations name Aurora 17.4, which supports these features. The prerequisite still recommends PostgreSQL 14 for full availability.
Review: We tested whether the 17.4 examples resolve the prerequisite ambiguity. They do not supply the missing minor-version requirements. We tested whether the Aurora 17.4 examples resolve the prerequisite. They do not establish full availability throughout PostgreSQL 14. The documented minor-version requirements support the charge.

Sources:
- [https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.BestPractices.memory.management.html](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.BestPractices.memory.management.html)
  Excerpt:
  ```text
  | 12.17, 13.13, 14.10, 15.5, and higher versions | `rds.enable_memory_management` | `true` | `SET rds.enable_memory_management = false;` |
  ```
- [https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Monitoring.Query.Plans.html](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Monitoring.Query.Plans.html)
  Excerpt:
  ```text
  You can monitor query peak memory usage in your DB instance to detect queries contributing to high database memory use from the following versions:
+ 16.3 and all higher versions
+ 15.7 and higher versions
+ 14.12 and higher versions
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F1

### F7 · Misleading · Applicable · The Balanced classification does not establish high memory use
Location: excerpt · section “Classifying queries: plan-heavy or execution-heavy” · as fetched 2026-10-19 · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=Balanced%20Both%20planning%20and%20execution%20are%20memory%2Dintensive)
Article says:
```text
…Balanced Both planning and execution are memory-intensive…
```
What is true:
The CASE expression compares peak ratios without an absolute byte threshold. Zero-byte planning and execution peaks both reach ELSE 'Balanced'. The label cannot establish that either phase consumes substantial memory. It cannot alone justify restructuring the schema.
So what:
Add an absolute memory threshold before recommending schema changes for queries labeled Balanced.
Charitable reading:
Balanced can describe a ratio between planning and execution peaks. It cannot establish that either peak is large.
Explanation: Checked for internal consistency: the evidence is the article itself.
Review: We evaluated both CASE predicates with zero peaks. Neither matches, and ranking ten queries supplies no absolute memory threshold. We evaluated both predicates at zero and at equal small peaks. Both cases return Balanced. Ranking by peak memory supplies no absolute threshold. The prescribed schema changes exceed what the classification establishes.

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F7

### F15 · Misleading · Consistent · Misleading: “…ORDER BY allocated DESC…”
Location: excerpt · section “Memory context inspection” · as fetched 2026-10-19 · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=ORDER%20BY%20allocated%20DESC)
Article says:
```text
…ORDER BY allocated DESC…
```
What is true:
pg_size_pretty returns text in REL_17_4 src/include/catalog/pg_proc.dat:7502. ORDER BY allocated therefore sorts the formatted output instead of numeric bytes. The displayed ranking places 8,192 bytes before 40 MB. Sort the qualified numeric input before LIMIT 20. These records do not establish that the displayed text order is impossible.
So what:
Alias aurora_stat_memctx_usage() as mu and use ORDER BY mu.allocated DESC before LIMIT 20.
Review: We tested text ordering as an explanation. E-44 establishes a text result, but no cited evidence establishes the collation. We checked whether ORDER BY uses the formatted output alias. It does, and E-44 confirms text output. The displayed allocation sequence also fails numeric descending order. Qualifying the numeric input corrects the ranking.

Sources:
- [REL_17_4 · src/include/catalog/pg_proc.dat:7500-7503](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/src/include/catalog/pg_proc.dat#L7500-L7503)
  Excerpt:
  ```text
  proname => 'pg_size_pretty', prorettype => 'text', proargtypes => 'int8',
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F15

### F2 · Imprecise · Applicable · Imprecise: “…the Sort node consumes minimal memory regardless of the result set size…”
Location: excerpt · section “Estimating work_mem usage from the plan” · as fetched 2026-10-19 · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=the%20Sort%20node%20consumes%20minimal,of%20the%20result%20set%20size)
Article says:
```text
…the Sort node consumes minimal memory regardless of the result set size…
```
What is true:
Top-N heapsort limits retained rows, so increasing input row count need not increase retained memory. Tuple width still matters. REL_17_4 src/backend/utils/sort/tuplesort.c:1256 documents possible work_mem overruns when later tuples are larger. The article should qualify its minimal-memory claim.
So what:
Measure retained row widths and actual sort memory before treating LIMIT as sufficient memory protection.
Review: We distinguished input row count from retained tuple width. E-17 challenges a byte guarantee, not bounded heapsort's row-count benefit. We checked the bounded-sort condition and the article's small-LIMIT qualification. REL_17_4 still permits significant memory overruns after bounded heapsort starts. The finding distinguishes algorithm selection from allocation size.

Sources:
- [REL_17_4 · src/backend/utils/sort/tuplesort.c:1256-1259](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/src/backend/utils/sort/tuplesort.c#L1256-L1259)
  Excerpt:
  ```text
  * Note that once we enter TSS_BOUNDED state we will always try to
			 * complete the sort that way.  In the worst case, if later input
			 * tuples are larger than earlier ones, this might cause us to
			 * exceed workMem significantly.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F2

### F5 · Imprecise · Applicable · Imprecise: “…t3 and t4g small instances on Aurora…”
Location: excerpt · section “Understanding Resident Set Size (RES) in Enhanced Monitoring” · as fetched 2026-10-19 · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=t3%20and%20t4g%20small%20instances%20on%20Aurora)
Article says:
```text
…t3 and t4g small instances on Aurora…
```
What is true:
Aurora documentation lists t3.medium, db.t3.large, db.t4g.medium, and db.t4g.large as huge-page exceptions (E-16). The article's phrase 'small instances' does not identify those sizes precisely. Check the exact instance class before applying its RES interpretation. Its later medium-class examples do not claim completeness.
So what:
Check huge-page support for db.t3.large and db.t4g.large before interpreting RES as excluding shared_buffers.
Review: We tested 'small instances' as an informal description of burstable classes. The later passage gives examples, not an exhaustive list. E-16 supports requiring exact class names, but the categorical inaccuracy charge overstates the wording. We checked whether later medium-class examples correct the exception list. The documented large-class exceptions remain missing.

Sources:
- [https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Managing.html](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Managing.html)
  Excerpt:
  ```text
  `Huge_pages` parameter is turned on by default for all DB instance classes other than t3.medium,db.t3.large,db.t4g.medium,db.t4g.large instance classes.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F5

### F6 · Imprecise · Factual · Imprecise: “…max_parallel_workers_per_gather worker processes are launched…”
Location: excerpt · section “Local memory (per-backend)” · as fetched 2026-10-19 · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=max_parallel_workers_per_gather%20worker%20processes%20are%20launched)
Article says:
```text
…max_parallel_workers_per_gather worker processes are launched…
```
What is true:
max_parallel_workers_per_gather sets the maximum workers for one Gather or Gather Merge node. E-22 and E-23 describe a ceiling, not a guaranteed launch count. The setting alone does not establish how many workers launched.
So what:
Use Workers Planned and Workers Launched from the actual plan when estimating observed parallel-query memory.
Review: E-22 and E-23 establish a maximum. Their recorded quotations do not establish the separate planner-choice and runtime-availability explanations.

Sources:
- [REL_17_4 · doc/src/sgml/config.sgml:2768-2775](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/doc/src/sgml/config.sgml#L2768-L2775)
  Excerpt:
  ```text
  Sets the maximum number of workers that can be started by a single
         <literal>Gather</literal> or <literal>Gather Merge</literal> node.
  ```
- [REL_17_4 · src/backend/utils/misc/guc_tables.c:3410-3418](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/src/backend/utils/misc/guc_tables.c#L3410-L3418)
  Excerpt:
  ```text
  {"max_parallel_workers_per_gather", PGC_USERSET, RESOURCES_ASYNCHRONOUS,
			gettext_noop("Sets the maximum number of parallel processes per executor node."),
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F6

## Verified accurate claims (11)

### F8 · Accurate · Factual · Hash-operation budgets multiply work_mem by hash_mem_multiplier
Location: excerpt · section “Local memory (per-backend)” · as fetched 2026-10-19 · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=the%20limit%20is%20work_mem%20x%20hash_mem_multiplier)
Article says:
```text
…the limit is work_mem x hash_mem_multiplier…
```
What is true:
REL_17_4 src/backend/executor/nodeHash.c:3592-3613 computes work_mem × hash_mem_multiplier in bytes. Separate sort and hash operations can consume separate budgets. The article correctly distinguishes these budgets from a single per-query allocation.
Charitable reading:
The statement describes the configured hash-operation budget. It does not establish an absolute process-memory ceiling.
Review: We checked whether the finding promises a process-memory ceiling. It correctly confines verification to configured operation budgets. We checked whether the finding mistakes an operation budget for total process memory. It explicitly avoids that claim. REL_17_4 computes the documented product and permits concurrent operation budgets.

Sources:
- [REL_17_4 · src/backend/executor/nodeHash.c:3592-3613](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/src/backend/executor/nodeHash.c#L3592-L3613)
  Excerpt:
  ```text
  mem_limit = (double) work_mem * hash_mem_multiplier * 1024.0;
  ```
- [REL_17_4 · doc/src/sgml/config.sgml:1845-1850](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/doc/src/sgml/config.sgml#L1845-L1850)
  Excerpt:
  ```text
  Note that a complex query might perform several sort and hash
        operations at the same time, with each operation generally being
        allowed to use as much memory as this value specifies before
        it starts
        to write data into temporary files.  Also, several running
        sessions could be doing such operations concurrently.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F8

### F9 · Accurate · Factual · Parallel maintenance does not multiply the command budget by worker count
Location: excerpt · section “Local memory (per-backend)” · as fetched 2026-10-19 · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=a%20limit%20applied%20to%20the,the%20number%20of%20parallel%20workers)
Article says:
```text
…a limit applied to the entire command regardless of the number of parallel workers…
```
What is true:
PostgreSQL 14.0 and 17.4 documentation apply maintenance_work_mem to the parallel utility command. REL_17_4 src/backend/access/nbtree/nbtsort.c:1720 divides the worker sort budget among participants.
Charitable reading:
The statement concerns the maintenance-operation budget, rather than every allocation made by its processes.
Review: We checked command budgets against worker allocations. Both documented versions agree, and nbtsort.c divides the sort budget among participants. We checked both release ranges and the participant division in nbtsort.c. They support command-level budgeting. The finding does not claim that every process allocation falls within maintenance_work_mem.

Sources:
- [REL_17_4 · doc/src/sgml/config.sgml:2802-2838](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/doc/src/sgml/config.sgml#L2802-L2838)
  Excerpt:
  ```text
  process.  Parallel utility commands treat the resource limit
         <varname>maintenance_work_mem</varname> as a limit to be applied to
         the entire utility command, regardless of the number of
         parallel worker processes.  However, parallel utility
  ```
- [REL_17_4 · src/backend/access/nbtree/nbtsort.c:1720-1720](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/src/backend/access/nbtree/nbtsort.c#L1720-L1720)
  Excerpt:
  ```text
  sortmem = maintenance_work_mem / btleader->nparticipanttuplesorts;
  ```
- [REL_14_0 · doc/src/sgml/config.sgml:2580-2622](https://github.com/postgres/postgres/blob/86a4dc1e6f29d1992a2afa3fac1a0b0a6e84568c/doc/src/sgml/config.sgml#L2580-L2622)
  Qualification: Version note: Checked the article's PostgreSQL 14 version floor.
  Excerpt:
  ```text
  process.  Parallel utility commands treat the resource limit
         <varname>maintenance_work_mem</varname> as a limit to be applied to
         the entire utility command, regardless of the number of
         parallel worker processes.  However, parallel utility
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F9

### F10 · Accurate · Factual · pg_log_backend_memory_contexts sends context details to the server log
Location: excerpt · section “Local memory (per-backend)” · as fetched 2026-10-19 · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=outputs%20memory%20context%20information%20to%20the%20PostgreSQL%20log)
Article says:
```text
…outputs memory context information to the PostgreSQL log…
```
What is true:
pg_log_backend_memory_contexts requests logging for the specified process and returns Boolean. REL_17_4 doc/src/sgml/func.sgml:28158-28166 states that details appear at LOG level rather than in client results. PostgreSQL 14.0 documents the same behavior.
Charitable reading:
The function returns a Boolean request result. The memory-context details appear in the server log.
Review: We distinguished the Boolean return from memory-context details. The catalog and both documentation versions support that distinction. We checked whether the Boolean return contradicts the article's logging description. It does not. Both release documents distinguish server-log details from client results.

Sources:
- [REL_17_4 · doc/src/sgml/func.sgml:28158-28166](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/doc/src/sgml/func.sgml#L28158-L28166)
  Excerpt:
  ```text
  Requests to log the memory contexts of the backend with the
        specified process ID.  This function can send the request to
        backends and auxiliary processes except logger.  These memory contexts
        will be logged at
        <literal>LOG</literal> message level. They will appear in
        the server log based on the log configuration set
        (see <xref linkend="runtime-config-logging"/> for more information),
        but will not be sent to the client regardless of
        <xref linkend="guc-client-min-messages"/>.
  ```
- [REL_17_4 · src/include/catalog/pg_proc.dat:8288-8291](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/src/include/catalog/pg_proc.dat#L8288-L8291)
  Excerpt:
  ```text
  { oid => '4543', descr => 'log memory contexts of the specified backend',
  proname => 'pg_log_backend_memory_contexts', provolatile => 'v',
  prorettype => 'bool', proargtypes => 'int4',
  prosrc => 'pg_log_backend_memory_contexts' },
  ```
- [REL_14_0 · doc/src/sgml/func.sgml:24953-24976](https://github.com/postgres/postgres/blob/86a4dc1e6f29d1992a2afa3fac1a0b0a6e84568c/doc/src/sgml/func.sgml#L24953-L24976)
  Qualification: Version note: The logging function also exists at the PostgreSQL 14 floor.
  Excerpt:
  ```text
  Requests to log the memory contexts of the backend with the
        specified process ID.  These memory contexts will be logged at
        <literal>LOG</literal> message level. They will appear in
  ```
- [REL_17_4 · doc/src/sgml/func.sgml:28161-28166](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/doc/src/sgml/func.sgml#L28161-L28166)
  Excerpt:
  ```text
  will be logged at
        <literal>LOG</literal> message level. They will appear in
        the server log based on the log configuration set
        (see <xref linkend="runtime-config-logging"/> for more information),
        but will not be sent to the client regardless of
        <xref linkend="guc-client-min-messages"/>.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F10

### F11 · Accurate · Factual · SET LOCAL confines the memory setting to the transaction
Location: excerpt · section “1. Set work_mem at session/transaction level” · as fetched 2026-10-19 · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=SET%20LOCAL%20is%20preferred%20to,scope%20to%20a%20single%20transaction.)
Article says:
```text
…SET LOCAL is preferred to limit scope to a single transaction.
```
What is true:
SET LOCAL expires when the current transaction ends, whether it commits or aborts. REL_17_4 doc/src/sgml/ref/set.sgml:55-56 confirms the example's transaction scope.
Charitable reading:
The example places SET LOCAL inside an explicit transaction.
Review: We checked for an absent transaction block and an unsupported sizing endorsement. The example includes BEGIN, and verification concerns scope. We checked transaction boundaries and abort behavior. The example uses an explicit transaction. REL_17_4 confirms that SET LOCAL ends with that transaction.

Sources:
- [REL_17_4 · doc/src/sgml/ref/set.sgml:55-56](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/doc/src/sgml/ref/set.sgml#L55-L56)
  Excerpt:
  ```text
  The effects of <command>SET LOCAL</command> last only till the end of
   the current transaction, whether committed or not.  A special case is
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F11

### F12 · Accurate · Factual · Aurora documents allocation-triggered cancellation under critical memory pressure
Location: excerpt · section “Preventing OOM with rds.enable_memory_management” · as fetched 2026-10-19 · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=cancel%20transactions%20that%20are%20requesting,the%20OOM%20killer%20is%20invoked)
Article says:
```text
…cancel transactions that are requesting memory allocations before the OOM killer is invoked…
```
What is true:
Aurora documentation describes canceling transactions that request memory under critical pressure. It documents rds.enable_memory_management as enabled by default for the applicable releases. The article's 17.4 example falls within that release scope.
Charitable reading:
The article explicitly warns that rapid concurrent allocations can defeat the protection.
Review: We tested whether verification implies guaranteed OOM prevention. The finding verifies cancellation behavior and default settings, not guaranteed protection. We tested whether the finding certifies guaranteed OOM prevention. It certifies the documented mechanism and default. The article separately acknowledges cancellation timing failures.

Sources:
- [https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.BestPractices.memory.management.html](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.BestPractices.memory.management.html)
  Excerpt:
  ```text
  | 12.17, 13.13, 14.10, 15.5, and higher versions | `rds.enable_memory_management` | `true` | `SET rds.enable_memory_management = false;` |
  ```
- [https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.BestPractices.memory.management.html](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.BestPractices.memory.management.html)
  Excerpt:
  ```text
  + Cancelling database transactions that request more memory when the system is approaching critical memory pressure.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F12

### F13 · Accurate · Factual · Aurora disables ANALYZE plan capture by default
Location: excerpt · section “CloudWatch Database Insights” · as fetched 2026-10-19 · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=captures%20the%20plan%20with%20EXPLAIN,execution%20of%20each%20new%20plan)
Article says:
```text
…captures the plan with EXPLAIN ANALYZE on the first execution of each new plan…
```
What is true:
The Aurora parameter reference gives aurora_stat_plans.with_analyze a default of off. Enabling it includes actual runtime statistics when Aurora first captures a plan.
Charitable reading:
The passage describes default capture behavior. Separate settings allow later plan recapture.
Review: We checked first capture against an unconditional claim about every execution. The finding preserves the documented first-capture condition. We checked the quotation's surrounding condition. The article explicitly requires with_analyze = on. E-35 confirms both the off default and first-capture behavior.

Sources:
- [https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Monitoring.Query.Plans.html](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Monitoring.Query.Plans.html)
  Excerpt:
  ```text
  Controls the EXPLAIN plan with ANALYZE. This mode is only used the first time a plan is captured. The allowed values are `on` and `off`. The default is `off`.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F13

### F14 · Accurate · Factual · Connection pooling reduces connection memory overhead
Location: excerpt · section “4. Use connection pooling to stabilize backend connections” · as fetched 2026-10-19 · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=reducing%20and%20stabilizing%20the%20connection,directly%20reduces%20the%20memory%20baseline)
Article says:
```text
…reducing and stabilizing the connection count directly reduces the memory baseline…
```
What is true:
RDS Proxy pools and reuses database connections. Aurora guidance documents incremental memory costs for connections. Reducing backend connections reduces that component of memory consumption.
Charitable reading:
The recommendation reduces connection overhead. It does not promise to bound active query allocations.
Review: We tested whether pooling guarantees bounded query memory. The finding verifies only reduced connection overhead. We tested whether pooling guarantees bounded query memory or linear total memory. The finding asserts neither. E-37 and E-38 support reducing the connection-overhead component.

Sources:
- [https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.html](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.html)
  Excerpt:
  ```text
  RDS Proxy establishes a database connection pool and reuses connections in this pool. This approach avoids the memory and CPU overhead of opening a new database connection each time.
  ```
- [https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Managing.html](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Managing.html)
  Excerpt:
  ```text
  Each connection to the DB cluster consumes incremental amounts of these resources, such as memory and CPU.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F14

### F16 · Accurate · Factual · The stated operation budgets total 20 MB
Location: excerpt · section “Estimating work_mem usage from the plan” · as fetched 2026-10-19 · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=%282%20x%204MB%20x%202.0%29,4MB%29%20%3D%2020MB%20per%20execution)
Article says:
```text
…(2 x 4MB x 2.0) + (1 x 4MB) = 20MB per execution…
```
What is true:
Two hash budgets consume 16 MB. One sort budget adds 4 MB. Their stated budget totals 20 MB. PostgreSQL 17.4 documents the work_mem × hash_mem_multiplier calculation.
Charitable reading:
The example estimates operation budgets, not measured total backend memory.
Review: We recalculated 2 × 4 × 2 + 4 = 20 MB. Verification concerns operation budgets, not measured process memory. We recalculated the stated budgets: 2 × 4 MB × 2 + 4 MB = 20 MB. The finding expressly limits accuracy to those assumptions. It does not certify measured backend memory.

Sources:
- [REL_17_4 · doc/src/sgml/config.sgml:1833-1870](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/doc/src/sgml/config.sgml#L1833-L1870)
  Excerpt:
  ```text
  memory limit for a hash table is computed by multiplying
        <varname>work_mem</varname> by
        <varname>hash_mem_multiplier</varname>.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F16

### F17 · Accurate · Factual · Verified accurate: “…rows=500529 loops=1)…”
Location: Article · exact quote · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=rows%3D500529%20loops%3D1%29)
Article says:
```text
…rows=500529 loops=1)…
```
What is true:
Both displayed scans account for 1 million rows. The first totals 500,529 returned rows plus 499,471 filtered rows. The second totals 600,537 returned rows plus 399,463 filtered rows.
Explanation: Checked for internal consistency: the evidence is the article itself.
Review: Both sums equal 1 million rows. The cited spans contain counts, not predicates, so they do not establish the causal explanation.

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F17

### F18 · Accurate · Factual · The shared-buffer totals reconcile across the plan
Location: Article · exact quote · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=Buffers%3A%20shared%20hit%3D43175%2C%20temp%20read%3D13178%20written%3D13197)
Article says:
```text
…Buffers: shared hit=43175, temp read=13178 written=13197…
```
What is true:
The parent reports 43,175 shared-buffer hits. Its children account for that total (derived: 34482 + 8693). Both displayed plans preserve this relationship.
Charitable reading:
Parent buffer counters include child activity. Adding every plan node would count activity repeatedly.
Explanation: Checked for internal consistency: the evidence is the article itself.
Review: We recalculated 34,482 + 8,693 = 43,175 shared-buffer hits and checked the corresponding second-plan counters. We checked both displayed plans and recalculated 34,482 + 8,693 = 43,175 buffer hits. The finding avoids adding inclusive parent counters repeatedly. Its arithmetic survives.

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F18

### F19 · Accurate · Factual · Verified accurate: “…a single sort node can use up to 5x work_mem…”
Location: excerpt · section “Local memory (per-backend)” · as fetched 2026-10-19 · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=a%20single%20sort%20node%20can%20use%20up%20to%205x%20work_mem)
Article says:
```text
…a single sort node can use up to 5x work_mem…
```
What is true:
PostgreSQL 17.4 documentation says a parallel query using four workers may consume five times the memory of a query using none. E-56 supports the article's possible fivefold resource estimate.
Review: E-56 supports possible fivefold query resource demand. Its recorded quotation does not specify individual sort allocations or participating-leader behavior.

Sources:
- [REL_17_4 · doc/src/sgml/config.sgml:2760-2800](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/doc/src/sgml/config.sgml#L2760-L2800)
  Excerpt:
  ```text
  For example, a parallel query using 4 workers may use up to 5 times
         as much CPU time, memory, I/O bandwidth, and so forth as a query which
         uses no workers at all.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F19

## Notes (not graded) (1)

### F4 · Note ·  · Note: “Temp file sizes tell you how much data overflowed beyond the hash budget.”
Location: excerpt · section “RDS for PostgreSQL DB logs” · as fetched 2026-10-19 · [open in article](https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory#:~:text=Temp%20file%20sizes%20tell%20you,overflowed%20beyond%20the%20hash%20budget.)
Article says:
```text
Temp file sizes tell you how much data overflowed beyond the hash budget.
```
What is true:
Temporary-file sizes measure spilled file bytes. They do not directly measure additional RAM needed to avoid batching. REL_17_4 src/backend/executor/nodeHashjoin.c:491 and :1344 show outer-batch storage and tuple serialization. This qualifies the article's description without establishing that it recommends adding spill bytes to work_mem.
So what:
Use EXPLAIN memory and batch statistics, then test a session-level budget. Do not add spill-file bytes to the hash budget.
Explanation: Not graded: no reader would act differently on it.
Review: We read data overflow as disk spill volume. The article does not explicitly equate that volume with additional required RAM. E-4 describes spilled data. It does not instruct readers to add file bytes to RAM budgets. E-20 and E-21 support that caveat, but cannot justify attributing the stronger claim.

Sources:
- [REL_17_4 · src/backend/executor/nodeHashjoin.c:482-502](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/src/backend/executor/nodeHashjoin.c#L482-L502)
  Excerpt:
  ```text
  * Need to postpone this outer tuple to a later batch.
					 * Save it in the corresponding outer-batch file.
  ```
- [REL_17_4 · src/backend/executor/nodeHashjoin.c:1344-1345](https://github.com/postgres/postgres/blob/f8554dee417ffc4540c94cf357f7bf7d4b6e5d80/src/backend/executor/nodeHashjoin.c#L1344-L1345)
  Excerpt:
  ```text
  BufFileWrite(file, &hashvalue, sizeof(uint32));
	BufFileWrite(file, tuple, tuple->t_len);
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72#F4

## Withdrawn findings (0)

None.

## Section checks

- Prerequisites · B+ · 1 misleading · 1 checked · 1 need data we do not have
- Local memory · A · 1 verified-accurate · 71% of claims (5 of 7, plus 6 that need data we do not have)
- Operation limits · A · 1 imprecise · 3 verified-accurate · 83% of claims (15 of 18)
- Resident memory · A · 1 imprecise · 100% of claims (4 of 4, plus 7 that need data we do not have)
- Plan viewer · A · 1 verified-accurate · 100% of claims (5 of 5, plus 1 that need data we do not have)
- EXPLAIN examples · A · 2 verified-accurate · 77% of claims (7 of 9, plus 11 that need data we do not have)
- Estimating query memory · A · 1 verified-accurate · 66% of claims (4 of 6)
- LIMIT and sorting · A · 1 imprecise · 50% of claims (3 of 6) provisional
- Temporary file logs · B+ · 1 inaccuracy · 50% of claims (3 of 6, plus 2 that need data we do not have) provisional
- Memory contexts · B+ · 1 misleading · 62% of claims (5 of 8, plus 10 that need data we do not have)
- Memory profiles · B+ · 1 misleading · 100% of claims (3 of 3, plus 5 that need data we do not have)
- Aurora OOM prevention · A · 1 verified-accurate · 100% of claims (2 of 2, plus 6 that need data we do not have)
- Immediate actions · A · 1 verified-accurate · 71% of claims (5 of 7, plus 2 that need data we do not have)
- Connection pooling · A · 1 verified-accurate · 100% of claims (1 of 1)

## Claim coverage

- Introduction: 0 of 4 Postgres claims checked, plus 2 that need data we do not have; not counted: 2 product or opinion, 3 not a claim; not checked: 4 for other reasons
- Prerequisites: 1 checked, plus 1 that need data we do not have; not counted: 3 product or opinion, 1 not a claim
- Memory architecture: 5 of 7 Postgres claims checked, plus 1 that need data we do not have; not counted: 2 product or opinion, 1 duplicate; not checked: 2 for other reasons
- Shared memory: 12 of 16 Postgres claims checked, plus 10 that need data we do not have; not counted: 1 duplicate; not checked: 4 for other reasons
- Local memory: 5 of 7 Postgres claims checked, plus 6 that need data we do not have; not counted: 1 duplicate; not checked: 2 for other reasons
- Operation limits: 15 of 18 Postgres claims checked; not counted: 2 duplicate; not checked: 3 for other reasons
- Connections: 3 of 6 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 product or opinion, 1 duplicate; not checked: 3 for other reasons
- Resident memory: 4 of 4 Postgres claims checked, plus 7 that need data we do not have; not counted: 1 product or opinion
- OOM troubleshooting: no checkable claims; not counted: 1 duplicate, 1 not a claim
- Memory pressure signals: 3 claims are the author's own account; nothing checkable; not counted: 4 product or opinion
- Memory pressure demonstration: 6 claims are the author's own account; nothing checkable
- Database Insights: 0 of 2 Postgres claims checked, plus 1 that need data we do not have; not counted: 7 product or opinion; not checked: 2 for other reasons
- Plan viewer: 5 of 5 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 product or opinion
- EXPLAIN examples: 7 of 9 Postgres claims checked, plus 11 that need data we do not have; not checked: 2 for other reasons
- Estimating query memory: 4 of 6 Postgres claims checked; not counted: 3 duplicate; not checked: 2 for other reasons
- LIMIT and sorting: 3 of 6 Postgres claims checked; not checked: 3 for other reasons
- Temporary file logs: 3 of 6 Postgres claims checked, plus 2 that need data we do not have; not counted: 1 product or opinion, 1 duplicate; not checked: 3 for other reasons
- Memory contexts: 5 of 8 Postgres claims checked, plus 10 that need data we do not have; not counted: 2 duplicate; not checked: 3 for other reasons
- Process monitoring: 1 of 1 Postgres claims checked, plus 6 that need data we do not have; not counted: 1 product or opinion, 2 duplicate
- Peak memory tracking: 3 of 3 Postgres claims checked, plus 10 that need data we do not have
- Memory profiles: 3 of 3 Postgres claims checked, plus 5 that need data we do not have
- Active-query correlation: 0 of 1 Postgres claims checked, plus 2 that need data we do not have; not counted: 1 not a claim; not checked: 1 for other reasons
- OOM demonstration: 3 claims are the author's own account; nothing checkable; not counted: 1 duplicate
- OOM detection: 0 of 1 Postgres claims checked, plus 5 that need data we do not have; not counted: 1 product or opinion; not checked: 1 for other reasons
- Aurora OOM prevention: 2 of 2 Postgres claims checked, plus 6 that need data we do not have
- Immediate actions: 5 of 7 Postgres claims checked, plus 2 that need data we do not have; not counted: 2 duplicate; not checked: 2 for other reasons
- Connection pooling: 1 of 1 Postgres claims checked; not counted: 2 product or opinion, 1 duplicate
- Limitations: 4 claims are the author's own account; nothing checkable; not counted: 1 product or opinion, 4 duplicate
- Engine comparison: 1 claim is the author's own account; nothing checkable; not counted: 1 product or opinion, 10 duplicate, 1 not a claim
- Conclusion: no checkable claims; not counted: 6 duplicate, 2 not a claim
- Authors: no checkable claims; not counted: 2 not a claim

## What we did not check

- We did not reproduce the displayed query plans, memory measurements, graphs, or OOM incident.
- We did not verify Aurora function signatures, identifier uniqueness, or the memory statistics shown in the examples.
- We did not verify Linux RES and VIRT accounting or the monitoring services' implementations.
- We did not verify engine-specific shared_buffers defaults or the complete set of RDS memory-protection features.
- We did not check every context name, crash-recovery step, or workload-specific tuning recommendation.
- We did not verify Aurora's internal cancellation timing or background-process protection.
- We did not establish whether documentation changed between August 19 and October 19, 2026.
- We did not verify the claimed absence of memory protection and peak-memory tracking from RDS for PostgreSQL.
- We did not check every PostgreSQL allocator, executor, and logging claim.
- We did not inspect the article's figures or original session records.
- We did not read Figures 1–6 as numerical data.
- We did not verify the allocation mechanisms behind the memory estimates.
- We did not establish that the OOM log came from the printed 15-session workload.
- Safe: we did not complete every applicable check.
- Section “LIMIT and sorting”: we checked 3 of 6 checkable claims.
- Section “Temporary file logs”: we checked 3 of 8 checkable claims.
- Section “Introduction”: we checked 0 of 6 checkable claims.
- Section “Connections”: we checked 3 of 7 checkable claims.
- Section “Database Insights”: we checked 0 of 3 checkable claims.
- Section “Active-query correlation”: we checked 0 of 3 checkable claims.
- Section “OOM detection”: we checked 0 of 6 checkable claims.
- We could not decide whether the article contains a material benchmark.
- We could not decide whether the article depends on finding F3.

## Notes

- B+ — the findings address the article's main subject. What we did not check is listed below. The findings directly check work_mem budgeting, diagnostic queries, logging, connection pooling, and Aurora memory protection.
- 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.48 · 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_4 at commit f8554dee417ffc4540c94cf357f7bf7d4b6e5d80 (pinned target); github.com/pgbouncer/pgbouncer pgbouncer_1_25_2 at commit 515b6284d273bfd62d1b7e3931ccdce41f9bfe7b (pinned target); https://aws.amazon.com/blogs/database/category/database/amazon-aurora/ (fetched 2026-10-19T06:26:56.822498Z); https://aws.amazon.com/blogs/database/category/database/amazon-aurora/postgresql-compatible/ (fetched 2026-10-19T06:27:06.804352Z); https://aws.amazon.com/blogs/database/category/database/amazon-rds/ (fetched 2026-10-19T06:27:02.150204Z); https://aws.amazon.com/blogs/database/category/database/amazon-rds/rds-for-postgresql/ (fetched 2026-10-19T06:27:10.307588Z); https://aws.amazon.com/blogs/database/category/learning-levels/advanced-300/ (fetched 2026-10-19T06:26:49.585142Z); https://aws.amazon.com/blogs/database/category/post-types/technical-how-to/ (fetched 2026-10-19T06:27:14.263060Z); https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Database-Insights.html (fetched 2026-10-19T06:27:21.012297Z); https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.AuroraPostgreSQL.html (fetched 2026-10-19T06:27:16.045659Z); https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.BestPractices.memory.management.html (fetched 2026-10-19T06:27:22.476910Z); https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Managing.html (fetched 2026-10-19T06:27:20.205131Z); https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Monitoring.Query.Plans.html (fetched 2026-10-19T06:27:21.774435Z); https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html (fetched 2026-10-19T06:27:15.298947Z); https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL.Concepts.General.FeatureSupport.HugePages.html (fetched 2026-10-19T06:27:19.529950Z); https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.html (fetched 2026-10-19T06:27:18.788403Z); https://www.postgresql.org/docs/current/runtime-config-resource.html (fetched 2026-10-19T06:27:18.001419Z).
- Article captured 2026-10-19T06:26:25.441986Z · SHA-256 01c6106b74975845625a5443e3cec1fd90170707d95b564130190cb398fa0de1 · Text extracted from the article's HTML.
- Policy SHA-256 2ea6b1fc490c518352499b9e68f57d68fc009986a9673b829d132835c229faad · Grading rules SHA-256 6fb334e79d6b9e7ed81d3238cc10d9de602ff87ed65ff2fa781f53bac5798765.
- We did not reproduce the displayed query plans, memory measurements, graphs, or OOM incident.
- We did not read Figures 1–6 as numerical data or inspect the original session records.
- We did not establish that the OOM log came from the printed 15-session workload.
- We did not verify Aurora function signatures, identifier uniqueness, or the displayed memory statistics.
- We did not check Linux RES and VIRT accounting or the monitoring services' implementations.
- We did not verify engine-specific shared_buffers defaults or the claimed absence of RDS memory protection and peak-memory tracking.
- We did not verify Aurora's internal cancellation timing or background-process protection.
- We did not check every allocator, executor, memory-context name, crash-recovery step, or workload-specific tuning recommendation.
- We did not establish whether the documentation changed between August 19 and October 19, 2026.
- The article gives August 19, 2026 without a time. We list that date at midnight UTC.
- article target version: bound to the most-cited major; also named 14 (1×), 1 (1×)
- source: the article names no pgbouncer release, so it was read at pgbouncer_1_25_2, 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-29: 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, 2 pinned source trees, and 15 fetched pages.
- 12 survived · 7 weakened · 0 withdrawn.

## Revision history

- [Revision 1](https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72?v=47) · 2026-09-06 16:40 UTC · C- · audit version not recorded · regrade version not recorded
  Article as first submitted. 17 accurate · 10 wrong · 16 caveats.
  ElephantSeal: C-.
  Changes: First audit. Open: F1 “You can see the full breakdown using the pg_shmem_allocations system view (PostgreSQL 14+).” (false); F3 “…LOG: terminating any other active server processes LOG: database system is shut down FATAL: the database system is in recovery mode…” (false); F9 “…WHERE pid = 799 ORDER BY allocated DESC LIMIT 20;…” (false); F10 “…This gives you a ranked list of backends by total memory consumption, a quick way to find the memory culprit during an incident.” (misleading); F11 “…Highest memory consumed during execution – hash tables, sort buffers, aggregation state at their peak. Primary driver of OOM risk.” (misleading); F12 “…we ran 15 concurrent sessions with work_mem = 1 GB sorting 30 million rows on Aurora PostgreSQL 17.4 (db.r7g.large, 16 GB)…” (misleading); F26 “These unbounded contexts rarely require intervention. They are managed internally by…” (misleading); F37 “…RESET max_parallel_workers_per_gather;…” (misleading); F45 “…for example, 102 GB on this db.r7g.large instance…” (misleading); F59 “…1754 MB…” (misleading); F2 “With log_temp_files = 0 set in the parameter group, every temporary file creation is logged.” (mostly accurate); F4 “Signal 9 ( SIGKILL ) is sent by the Linux OOM killer when the system runs out of available memory.” (mostly accurate); F5 “…ERROR: out of memory DETAIL: Failed on request of size \<N\>.” (mostly accurate); F6 “Note that the optimizer uses bounded heapsort only when the LIMIT is sufficiently small relative to total rows. For very large LIMIT values, it might…” (mostly accurate); F7 “…Buckets: 262144 Batches: 1 Memory Usage: 18289kB…” (mostly accurate); F8 “…RESET enable_mergejoin; RESET enable_nestloop; RESET max_parallel_workers_per_gather; SET SET SET SET…” (mostly accurate); F13 “As shown in the preceding OOM scenario, without this feature ( rds.enable_memory_management = off ), excessive memory consumption leads to the OOM killer terminating PostgreSQL…” (mostly accurate); F14 “…(except micro, small, and medium instances on RDS, and t3 and t4g small instances on Aurora)…” (mostly accurate); F16 “…When the planner chooses a parallel plan, max_parallel_workers_per_gather worker processes are launched, each consuming its own work_mem . With 4 parallel workers, a single sort…” (mostly accurate); F23 “…Memory context inspection pg_log_backend_memory_contexts() (log output) aurora_stat_memctx_usage() (real-time query)…” (mostly accurate); F24 “…while platform processes ( rdsadmin , Aurora runtime) show 40–100 MB…” (mostly accurate); F25 “On Aurora, every backend shows a large VIRT (for example, 102 GB on this db.r7g.large instance) because shared_buffers is mapped into each process’s address space.” (mostly accurate); F28 “…-- Transaction-scoped (reverts automatically at COMMIT)…” (mostly accurate); F38 “…LOG: database system is shut down…” (mostly accurate); F60 “…WHEN max_exec_peakmem \> max_plan_peakmem \* 2 THEN 'Execution-heavy'…” (mostly accurate); F61 “FreeableMemory (blue) plummeted from approximately 4 GB to under 20…” (mostly accurate).
- [Revision 2](https://pgtrue.postgres.ai/shared/brief/851c8023-afa5-4b9a-8440-27bcccfc0b72?v=53) · this page · 2026-10-19 06:26 UTC · B+ · audited with v1.0.14 (approx.) · regraded with v1.1.1 (approx.)
  Same article text, re-audited. 11 accurate · 4 wrong · 3 caveats.
  ElephantSeal: B+.
  Changes: No longer reported: “You can see the full breakdown using the pg_shmem_allocations system view (PostgreSQL 14+).”; “…LOG: terminating any other active server processes LOG: database system is shut down FATAL: the database system is in recovery mode…”; “…WHERE pid = 799 ORDER BY allocated DESC LIMIT 20;…”; “…This gives you a ranked list of backends by total memory consumption, a quick way to find the memory culprit during an incident.”; “…Highest memory consumed during execution – hash tables, sort buffers, aggregation state at their peak. Primary driver of OOM risk.”; “…we ran 15 concurrent sessions with work_mem = 1 GB sorting 30 million rows on Aurora PostgreSQL 17.4 (db.r7g.large, 16 GB)…”; “These unbounded contexts rarely require intervention. They are managed internally by…”; “…RESET max_parallel_workers_per_gather;…”; “…for example, 102 GB on this db.r7g.large instance…”; “…1754 MB…”; “With log_temp_files = 0 set in the parameter group, every temporary file creation is logged.”; “Signal 9 ( SIGKILL ) is sent by the Linux OOM killer when the system runs out of available memory.”; “…ERROR: out of memory DETAIL: Failed on request of size \<N\>.”; “Note that the optimizer uses bounded heapsort only when the LIMIT is sufficiently small relative to total rows. For very large LIMIT values, it might…”; “…Buckets: 262144 Batches: 1 Memory Usage: 18289kB…”; “…RESET enable_mergejoin; RESET enable_nestloop; RESET max_parallel_workers_per_gather; SET SET SET SET…”; “As shown in the preceding OOM scenario, without this feature ( rds.enable_memory_management = off ), excessive memory consumption leads to the OOM killer terminating PostgreSQL…”; “…(except micro, small, and medium instances on RDS, and t3 and t4g small instances on Aurora)…”; “…When the planner chooses a parallel plan, max_parallel_workers_per_gather worker processes are launched, each consuming its own work_mem . With 4 parallel workers, a single sort…”; “…Memory context inspection pg_log_backend_memory_contexts() (log output) aurora_stat_memctx_usage() (real-time query)…”; “…while platform processes ( rdsadmin , Aurora runtime) show 40–100 MB…”; “On Aurora, every backend shows a large VIRT (for example, 102 GB on this db.r7g.large instance) because shared_buffers is mapped into each process’s address space.”; “…-- Transaction-scoped (reverts automatically at COMMIT)…”; “…LOG: database system is shut down…”; “…WHEN max_exec_peakmem \> max_plan_peakmem \* 2 THEN 'Execution-heavy'…”; “FreeableMemory (blue) plummeted from approximately 4 GB to under 20…”. New: F3 “Temporary-file logging records deletion rather than creation” (false); F1 “PostgreSQL 14 alone does not provide all demonstrated Aurora features” (misleading); F7 “The Balanced classification does not establish high memory use” (misleading); F15 “…ORDER BY allocated DESC…” (misleading); F2 “…the Sort node consumes minimal memory regardless of the result set size…” (mostly accurate); F5 “…t3 and t4g small instances on Aurora…” (mostly accurate); F6 “…max_parallel_workers_per_gather worker processes are launched…” (mostly accurate).

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