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: PG18 preserves planner statistics on upgrade — even from PG14
Article title: PG18 preserves planner statistics on upgrade — even from PG14
Article URL: https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions
Report URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713
Audited revision: 2 of 2, 2026-10-19 06:26:45 UTC
Overall letter: A-
## Axes
- Factual: B+ · 1 wrong · 14 checked · 0 caveats · assessed
- Applicable: A · 0 wrong · 11 checked · 1 caveats · assessed
- Consistent: A · 0 wrong · 14 checked · 0 caveats · assessed
- Transparent: A · 0 wrong · 7 checked · 0 caveats · assessed
- Safe: A · 0 wrong · 11 checked · 0 caveats · assessed
ElephantSeal: A-.
## 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. The article changed 1 time after our first audit; we re-audited each version. See Revisions below. Policy: [right-of-reply and corrections policy](/pgtrue/security).
- pgTrue version: audited with v1.0.14 (approx.) · regraded with v1.1.0 (approx.)
## Findings needing a change (2)
### F1 · Inaccurate · Factual · The empty-table catalog query does not show a 10-million-row planner estimate
Location: excerpt · section “Let's test it” · as fetched 2026-10-19 · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=the%20planner%20sees%2010M)
Article says:
```text
…the planner sees 10M…
```
What is true:
The planner checks physical table size. src/backend/access/table/tableam.c:704 returns 0 tuples when the table has 0 pages. Imported reltuples can still contain approximately 10 million tuples. The displayed catalog value proves restoration, but it does not prove the stated planner estimate.
So what:
Use EXPLAIN SELECT \* FROM demo to inspect the planner estimate. Use the catalog query only to verify statistics import.
Charitable reading:
The displayed reltuples value demonstrates catalog restoration. The separate statement about the planner claims more.
Review: We checked the empty-table branch and its preceding minimum-size heuristic. Positive imported reltuples bypasses that heuristic. The catalog measurement remains valid, but it does not establish a 10-million-row planner estimate. We checked the surrounding size heuristic. Positive imported reltuples bypasses the minimum-page assumption. Zero physical pages still produces zero estimated tuples.
Sources:
- [REL_18_3 · src/backend/access/table/tableam.c:700-709](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/backend/access/table/tableam.c#L700-L709)
Excerpt:
```text
if (curpages == 0)
{
*tuples = 0;
*allvisfrac = 0;
return;
}
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F1
### F2 · Imprecise · Applicable · Increasing default_statistics_target does not proportionally increase every ANALYZE runtime
Location: excerpt · section “The problem: upgrading Postgres has always meant losing statistics” · as fetched 2026-10-19 · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=the%20duration%20of%20ANALYZE%20increases%20proportionally)
Article says:
```text
…the duration of ANALYZE increases proportionally…
```
What is true:
ANALYZE applies default_statistics_target only to columns without explicit targets. src/backend/commands/analyze.c:1177 also caps sampled blocks at the table's block count. Sample size can scale with the target. Total elapsed time need not scale proportionally.
So what:
Benchmark ANALYZE with the intended statistics targets before sizing the maintenance window.
Charitable reading:
The standard sample target scales with the statistics target. That relationship does not establish proportional total execution time.
Review: We tested the charitable reading that sample size scales proportionally. The code supports that relationship, but block limits defeat proportional runtime. Benchmarking ANALYZE before scheduling maintenance is a concrete corrective action. We tested the charitable sample-size reading. The 300-times-target formula supports proportional sampling requests, but table-size limits prevent a proportional runtime guarantee.
Sources:
- [REL_18_3 · doc/src/sgml/config.sgml:6372-6377](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/doc/src/sgml/config.sgml#L6372-L6377)
Excerpt:
```text
Sets the default statistics target for table columns without
a column-specific target set via <command>ALTER TABLE
SET STATISTICS</command>. Larger values increase the time needed to
do <command>ANALYZE</command>, but might improve the quality of the
planner's estimates. The default is 100.
```
- [REL_18_3 · src/backend/commands/analyze.c:1894-1900](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/backend/commands/analyze.c#L1894-L1900)
Excerpt:
```text
/* If the attstattarget column is negative, use the default value */
if (stats->attstattarget < 0)
stats->attstattarget = default_statistics_target;
```
- [REL_18_3 · src/backend/commands/analyze.c:1170-1185](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/backend/commands/analyze.c#L1170-L1185)
Excerpt:
```text
* As of May 2004 we use a new two-stage method: Stage one selects up
* to targrows random blocks (or all blocks, if there aren't so many).
* Stage two scans these blocks and uses the Vitter algorithm to create
* a random sample of targrows rows (or less, if there are less in the
* sample of blocks).
```
- [REL_18_3 · src/backend/commands/analyze.c:1887-1958](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/backend/commands/analyze.c#L1887-L1958)
Excerpt:
```text
/* If the attstattarget column is negative, use the default value */
if (stats->attstattarget < 0)
stats->attstattarget = default_statistics_target;
```
- [REL_18_3 · src/backend/commands/analyze.c:1887-1958](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/backend/commands/analyze.c#L1887-L1958)
Excerpt:
```text
stats->minrows = 300 * stats->attstattarget;
```
- [https://www.endpointdev.com/blog/2016/12/postgres-statistics-and-pain-of-analyze/](https://www.endpointdev.com/blog/2016/12/postgres-statistics-and-pain-of-analyze/)
Excerpt:
```text
Time: 590.820 ms ## Actually best of 10: never get figures from a single run! $ psql -c 'alter table aztest alter column aid set statistics 1000' ALTER TABLE $ psql -qc '\timing' -c 'analyze aztest' Time: 2324.017 ms
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F2
## Verified accurate claims (12)
### F4 · Accurate · Factual · PG18 pg_upgrade exports statistics using the target pg_dump
Location: excerpt · section “PG18 preserves planner statistics on upgrade — even from PG14” · as fetched 2026-10-19 · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=PG18%20preserves%20statistics%20during%20pg_upgrade)
Article says:
```text
…PG18 preserves statistics during pg_upgrade…
```
What is true:
src/bin/pg_upgrade/dump.c:54 invokes pg_dump from new_cluster.bindir against old_cluster. It passes --statistics unless statistics transfer is disabled. PostgreSQL 14 exposes the relation and column catalog fields the exporter reads.
Charitable reading:
The article limits this behavior to pg_upgrade workflows and separately describes logical replication.
Review: We checked binary selection, connection selection, and the statistics option. dump.c uses the new binary against the old cluster. The finding preserves the option to disable transfer. We checked the complete invocation. It selects the new binary, the old connection, and the statistics option. The finding preserves the disable-option exception.
Sources:
- [REL_18_3 · doc/src/sgml/ref/pgupgrade.sgml:834-839](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/doc/src/sgml/ref/pgupgrade.sgml#L834-L839)
Excerpt:
```text
Unless the <option>--no-statistics</option> option is specified,
<command>pg_upgrade</command> will transfer most optimizer statistics
from the old cluster to the new cluster. This does not transfer
all statistics, such as those created explicitly with
<xref linkend="sql-createstatistics"/>, custom statistics added by
an extension, or statistics collected by the cumulative statistics system.
```
- [REL_18_3 · src/bin/pg_upgrade/dump.c:54-62](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/bin/pg_upgrade/dump.c#L54-L62)
Excerpt:
```text
new_cluster.bindir, cluster_conn_opts(&old_cluster),
(user_opts.transfer_mode == TRANSFER_MODE_SWAP) ?
"" : "--sequence-data",
log_opts.verbose ? "--verbose" : "",
user_opts.do_statistics ? "--statistics" : "--no-statistics",
```
- [REL_14_24 · src/include/catalog/pg_class.h:59-75](https://github.com/postgres/postgres/blob/6b3806732b7c5df06bdd0ed150e8a07b4ad62315/src/include/catalog/pg_class.h#L59-L75)
Qualification: Version note: Checked the article's PostgreSQL 14 source-version floor.
Excerpt:
```text
/* # of blocks (not always up-to-date) */
int32 relpages BKI_DEFAULT(0);
/* # of tuples (not always up-to-date; -1 means "unknown") */
float4 reltuples BKI_DEFAULT(-1);
/* # of all-visible blocks (not always up-to-date) */
int32 relallvisible BKI_DEFAULT(0);
```
- [REL_14_24 · src/backend/catalog/system_views.sql:183-201](https://github.com/postgres/postgres/blob/6b3806732b7c5df06bdd0ed150e8a07b4ad62315/src/backend/catalog/system_views.sql#L183-L201)
Qualification: Version note: Checked the article's PostgreSQL 14 source-version floor.
Excerpt:
```text
CREATE VIEW pg_stats WITH (security_barrier) AS
SELECT
nspname AS schemaname,
relname AS tablename,
attname AS attname,
stainherit AS inherited,
stanullfrac AS null_frac,
stawidth AS avg_width,
stadistinct AS n_distinct,
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F4
### F5 · Accurate · Factual · The exporter reads the named relation and column statistics
Location: excerpt · section “Why it works” · as fetched 2026-10-19 · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=reads%20from%20pg_class%20%28for%20relpages%20%2C%20reltuples%20%2C%20relallvisible%20%29)
Article says:
```text
…reads from pg_class (for relpages , reltuples , relallvisible )…
```
What is true:
src/bin/pg_dump/pg_dump.c selects relpages, reltuples, and relallvisible. Its attribute query reads pg_stats fields including null_frac, avg_width, n_distinct, most_common_vals, histogram_bounds, and correlation.
Charitable reading:
The named statistics are supported fields. The article separately identifies source-version restrictions.
Review: We compared each named field with the exporter queries. Both relation fields and column fields appear in the cited source. We checked field selection and the pg_stats FROM clause. Both support the named relation and column fields.
Sources:
- [REL_18_3 · src/bin/pg_dump/pg_dump.c:7084-7115](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/bin/pg_dump/pg_dump.c#L7084-L7115)
Excerpt:
```text
"c.relhasindex, c.relhasrules, c.relpages, "
"c.reltuples, c.relallvisible, ");
if (fout->remoteVersion >= 180000)
appendPQExpBufferStr(query, "c.relallfrozen, ");
else
appendPQExpBufferStr(query, "0 AS relallfrozen, ");
```
- [REL_18_3 · src/bin/pg_dump/pg_dump.c:10975-11065](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/bin/pg_dump/pg_dump.c#L10975-L11065)
Excerpt:
```text
"SELECT s.schemaname, s.tablename, s.attname, s.inherited, "
"s.null_frac, s.avg_width, s.n_distinct, "
"s.most_common_vals, s.most_common_freqs, "
"s.histogram_bounds, s.correlation, "
```
- [REL_18_3 · src/include/catalog/pg_class.h:59-75](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/include/catalog/pg_class.h#L59-L75)
Excerpt:
```text
/* # of tuples (not always up-to-date; -1 means "unknown") */
float4 reltuples BKI_DEFAULT(-1);
/* # of all-visible blocks (not always up-to-date) */
int32 relallvisible BKI_DEFAULT(0);
/* # of all-frozen blocks (not always up-to-date) */
int32 relallfrozen BKI_DEFAULT(0);
```
- [REL_18_3 · src/bin/pg_dump/pg_dump.c:10975-11065](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/bin/pg_dump/pg_dump.c#L10975-L11065)
Excerpt:
```text
"FROM pg_catalog.pg_stats s "
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F5
### F6 · Accurate · Factual · The PG18 restore functions update relation and column statistics
Location: excerpt · section “Why it works” · as fetched 2026-10-19 · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=pg_restore_relation_stats%28%29%20and%20pg_restore_attribute_stats%28%29)
Article says:
```text
pg_restore_relation_stats() and pg_restore_attribute_stats()…
```
What is true:
pg_restore_relation_stats calls relation_statistics_update in src/backend/statistics/relation_stats.c:239. pg_restore_attribute_stats calls attribute_statistics_update in src/backend/statistics/attribute_stats.c:1003. Their documentation describes table-level and column-level updates, respectively.
Charitable reading:
The source server supplies catalog values. The target server executes the restoration functions.
Review: We checked both function bodies against their documentation. Each calls the stated statistics updater. Neither finding claims these functions must exist on the source server. We checked both implementation calls against their documentation. They update relation-level and attribute-level statistics as stated.
Sources:
- [REL_18_3 · doc/src/sgml/func.sgml:30495-30566](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/doc/src/sgml/func.sgml#L30495-L30566)
Excerpt:
```text
Updates table-level statistics. Ordinarily, these statistics are
collected automatically or updated as a part of <xref
linkend="sql-vacuum"/> or <xref linkend="sql-analyze"/>, so it's not
necessary to call this function.
```
- [REL_18_3 · doc/src/sgml/func.sgml:30588-30660](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/doc/src/sgml/func.sgml#L30588-L30660)
Excerpt:
```text
Creates or updates column-level statistics.
```
- [REL_18_3 · src/backend/statistics/relation_stats.c:226-241](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/backend/statistics/relation_stats.c#L226-L241)
Excerpt:
```text
if (!relation_statistics_update(positional_fcinfo))
result = false;
```
- [REL_18_3 · src/backend/statistics/attribute_stats.c:991-1004](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/backend/statistics/attribute_stats.c#L991-L1004)
Excerpt:
```text
if (!attribute_statistics_update(positional_fcinfo))
result = false;
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F6
### F7 · Accurate · Factual · The exporter applies the stated source-version compatibility rules
Location: excerpt · section “Why it works” · as fetched 2026-10-19 · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=handles%20version%20differences%20gracefully)
Article says:
```text
…handles version differences gracefully…
```
What is true:
src/bin/pg_dump/pg_dump.c remaps reltuples=0 to -1 before PostgreSQL 14. It omits range-specific fields before PostgreSQL 17. It substitutes relallfrozen=0 before PostgreSQL 18. The target catalog also defaults relallfrozen to 0.
Charitable reading:
The compatibility statements concern individual fields, rather than complete preservation of every statistic.
Review: We checked all three version boundaries. The exporter remaps pre-14 zero tuples and omits pre-17 range fields. Pre-18 frozen-page handling agrees with the zero catalog default. We checked all three version boundaries. Older sources omit the frozen-page restoration argument, consistent with the target's zero default.
Sources:
- [REL_18_3 · src/bin/pg_dump/pg_dump.c:7084-7115](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/bin/pg_dump/pg_dump.c#L7084-L7115)
Excerpt:
```text
"c.relhasindex, c.relhasrules, c.relpages, "
"c.reltuples, c.relallvisible, ");
if (fout->remoteVersion >= 180000)
appendPQExpBufferStr(query, "c.relallfrozen, ");
else
appendPQExpBufferStr(query, "0 AS relallfrozen, ");
```
- [REL_18_3 · src/bin/pg_dump/pg_dump.c:11045-11055](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/bin/pg_dump/pg_dump.c#L11045-L11055)
Excerpt:
```text
if (fout->remoteVersion < 140000 && strcmp("0", rsinfo->reltuples) == 0)
appendPQExpBufferStr(out, "\t'reltuples', '-1'::real,\n");
```
- [REL_18_3 · src/bin/pg_dump/pg_dump.c:10984-10992](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/bin/pg_dump/pg_dump.c#L10984-L10992)
Excerpt:
```text
if (fout->remoteVersion >= 170000)
appendPQExpBufferStr(query,
"s.range_length_histogram, "
"s.range_empty_frac, "
"s.range_bounds_histogram ");
else
appendPQExpBufferStr(query,
"NULL AS range_length_histogram,"
```
- [REL_18_3 · src/include/catalog/pg_class.h:59-75](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/include/catalog/pg_class.h#L59-L75)
Excerpt:
```text
/* # of tuples (not always up-to-date; -1 means "unknown") */
float4 reltuples BKI_DEFAULT(-1);
/* # of all-visible blocks (not always up-to-date) */
int32 relallvisible BKI_DEFAULT(0);
/* # of all-frozen blocks (not always up-to-date) */
int32 relallfrozen BKI_DEFAULT(0);
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F7
### F8 · Accurate · Factual · The two analysis commands match PostgreSQL 18 documentation
Location: excerpt · section “Caveats” · as fetched 2026-10-19 · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=The%20official%20pg_upgrade%20documentation%20recommends%20a%20two%2Dstep%20post%2Dupgrade%20process)
Article says:
```text
The official pg_upgrade documentation recommends a two-step post-upgrade process…
```
What is true:
doc/src/sgml/ref/pgupgrade.sgml:850 recommends --analyze-in-stages --missing-stats-only, followed by --analyze-only. The documentation identifies missing optimizer statistics and cumulative maintenance statistics as reasons for these passes.
Charitable reading:
The article describes the official procedure, rather than claiming the first pass alone rebuilds every missing statistic.
Review: We compared both commands and their stated purposes with the pinned documentation. The finding verifies the recommendation without claiming universal relation coverage. We checked both commands and their order. The finding verifies documented guidance without claiming that vacuumdb reaches every relation type.
Sources:
- [REL_18_3 · doc/src/sgml/ref/pgupgrade.sgml:834-839](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/doc/src/sgml/ref/pgupgrade.sgml#L834-L839)
Excerpt:
```text
Unless the <option>--no-statistics</option> option is specified,
<command>pg_upgrade</command> will transfer most optimizer statistics
from the old cluster to the new cluster. This does not transfer
all statistics, such as those created explicitly with
<xref linkend="sql-createstatistics"/>, custom statistics added by
an extension, or statistics collected by the cumulative statistics system.
```
- [REL_18_3 · doc/src/sgml/ref/pgupgrade.sgml:850-856](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/doc/src/sgml/ref/pgupgrade.sgml#L850-L856)
Excerpt:
```text
First, use
<command>vacuumdb --all --analyze-in-stages --missing-stats-only</command>
to quickly generate minimal optimizer statistics for relations without
any. Then, use <command>vacuumdb --all --analyze-only</command> to ensure
all relations have updated cumulative statistics for triggering vacuum and
analyze. For both commands, the use of <option>--jobs</option> can speed
it up.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F8
### F10 · Accurate · Factual · Statistics-only export excludes table data
Location: excerpt · section “Caveats” · as fetched 2026-10-19 · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=the%20stats%20dump%20is%20metadata%2Donly,is%20read%2C%20just%20catalog%20queries)
Article says:
```text
…the stats dump is metadata-only — no table data is read, just catalog queries…
```
What is true:
src/bin/pg_dump/pg_dump.c:881 disables data dumping for --statistics-only. The statistics exporter reads relation metadata and pg_stats. This confirms catalog-based export, without establishing the article's runtime estimate.
Charitable reading:
Metadata-only describes the exported statistics. It does not establish a fixed elapsed-time bound.
Review: We checked option interactions and catalog reads. The demonstrated statistics-only invocation disables data dumping. The finding expressly excludes the unsupported runtime bound. We checked the dumpData expression and catalog query. The finding explicitly excludes the unsupported seconds-only timing assertion from its accuracy judgment.
Sources:
- [REL_18_3 · src/bin/pg_dump/pg_dump.c:7084-7115](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/bin/pg_dump/pg_dump.c#L7084-L7115)
Excerpt:
```text
"c.relhasindex, c.relhasrules, c.relpages, "
"c.reltuples, c.relallvisible, ");
if (fout->remoteVersion >= 180000)
appendPQExpBufferStr(query, "c.relallfrozen, ");
else
appendPQExpBufferStr(query, "0 AS relallfrozen, ");
```
- [REL_18_3 · src/bin/pg_dump/pg_dump.c:10975-11065](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/bin/pg_dump/pg_dump.c#L10975-L11065)
Excerpt:
```text
"SELECT s.schemaname, s.tablename, s.attname, s.inherited, "
"s.null_frac, s.avg_width, s.n_distinct, "
"s.most_common_vals, s.most_common_freqs, "
"s.histogram_bounds, s.correlation, "
```
- [REL_18_3 · src/bin/pg_dump/pg_dump.c:879-887](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/bin/pg_dump/pg_dump.c#L879-L887)
Excerpt:
```text
dopt.dumpData = ((dopt.dumpData && !schema_only && !statistics_only) ||
data_only) && !no_data;
```
- [REL_18_3 · src/bin/pg_dump/pg_dump.c:10975-11065](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/bin/pg_dump/pg_dump.c#L10975-L11065)
Excerpt:
```text
"FROM pg_catalog.pg_stats s "
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F10
### F12 · Accurate · Factual · PostgreSQL 18 introduced planner-statistics preservation
Location: excerpt · section “What PG18 changes” · as fetched 2026-10-19 · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=Postgres%2018%20introduces%20statistics%20export%20and%20import.)
Article says:
```text
…Postgres 18 introduces statistics export and import.
```
What is true:
The PostgreSQL 18 release announcement confirms planner-statistics preservation across major upgrades. It describes faster recovery of expected performance.
Charitable reading:
The article describes supported planner statistics, then separately lists statistics that require rebuilding.
Review: We checked whether the announcement supports preservation or merely faster analysis. It explicitly confirms preservation across major upgrades. We checked the announcement's preservation statement. The finding does not extend it into a complete-transfer or optimal-plan guarantee.
Sources:
- [https://www.postgresql.org/about/news/postgresql-18-released-3142/](https://www.postgresql.org/about/news/postgresql-18-released-3142/)
Excerpt:
```text
PostgreSQL 18 introduces the ability to keep planner
statistics through a major version upgrade
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F12
### F13 · Accurate · Factual · The 2016 post supports the historical analysis-delay comparison
Location: excerpt · section “The problem: upgrading Postgres has always meant losing statistics” · as fetched 2026-10-19 · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=sometimes%20take%20longer%20than%20the%20entire%20rest%20of%20the%20upgrade)
Article says:
```text
…sometimes take longer than the entire rest of the upgrade…
```
What is true:
Greg Sabino Mullane's December 2016 post says analysis sometimes exceeded the rest of the upgrade. The article preserves that conditional comparison.
Charitable reading:
The article paraphrases the 2016 post rather than presenting a new benchmark.
Review: We checked the historical source and its conditional wording. The article preserves the comparison and corrects a grammatical typo without changing meaning. We checked the historical post and its conditional wording. Correcting its grammatical typo preserves the comparison.
Sources:
- [https://www.endpointdev.com/blog/2016/12/postgres-statistics-and-pain-of-analyze/](https://www.endpointdev.com/blog/2016/12/postgres-statistics-and-pain-of-analyze/)
Excerpt:
```text
sometimes take longer that the entire rest of the upgrade!
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F13
### F14 · Accurate · Factual · The partitioned-table analysis improvement targets PostgreSQL 19
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=it%27s%20going%20to%20be%20much%20better%20in%20Postgres%2019)
Article says:
```text
…it's going to be much better in Postgres 19…
```
What is true:
Patch 5871 makes vacuumdb --analyze-only process partitioned tables. Its record identifies PostgreSQL 19 as the target and lists committed status.
Charitable reading:
The PostgreSQL 19 statement concerns the linked partitioned-table analysis improvement.
Review: We checked target version and committed status separately. Patch 5871 identifies PostgreSQL 19 and records completion. The finding claims no measured speedup. We checked the patch title, target version, and committed status. They support the article's prospective PostgreSQL 19 statement at publication.
Sources:
- [https://commitfest.postgresql.org/patch/5871/](https://commitfest.postgresql.org/patch/5871/)
Excerpt:
```text
Status PG19-2 (2025-09-01 – 2025-09-30): Committed PG19-1 (2025-07-01 – 2025-07-31): Moved to different CF Target version 19
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F14
### F15 · Accurate · Factual · The pg_dump compatibility quotation matches the manual
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=pg_dump%20can%20also%20dump%20from,older%20than%20its%20own%20version.)
Article says:
```text
…pg_dump can also dump from PostgreSQL servers older than its own version.
```
What is true:
The pg_dump manual confirms support for servers older than the client. This supports connection compatibility, not every statistics-transfer version boundary.
Charitable reading:
General older-server compatibility does not establish support for every statistics field.
Review: We checked the moving documentation URL's retrieved version label. It identifies PostgreSQL 18. The compatibility sentence matches exactly and establishes no broader field-level guarantee. We checked the moving documentation URL's recorded version header. It identifies PostgreSQL 18 and contains the quotation verbatim.
Sources:
- [https://www.postgresql.org/docs/current/app-pgdump.html](https://www.postgresql.org/docs/current/app-pgdump.html)
Excerpt:
```text
pg_dump can also dump from PostgreSQL servers older than its own version.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F15
### F16 · Accurate · Factual · The second analysis pass matches PostgreSQL 18 guidance
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=updates%20the%20cumulative%20statistics%20used,trigger%20automatic%20vacuum%20and%20analyze)
Article says:
```text
…updates the cumulative statistics used to trigger automatic vacuum and analyze…
```
What is true:
PostgreSQL 18's upgrade manual recommends both analysis passes. It identifies updated cumulative statistics for automatic vacuum and analyze as the second pass's purpose.
Charitable reading:
The article repeats the PostgreSQL 18 manual's two-pass maintenance recommendation.
Review: We checked whether the second pass's cumulative-statistics rationale appears in the manual. It does. This finding verifies guidance rather than complete relation coverage. We checked the second-pass rationale against PostgreSQL 18 guidance. The finding verifies that guidance, with the partitioned-parent exception recorded separately.
Sources:
- [https://www.postgresql.org/docs/18/pgupgrade.html](https://www.postgresql.org/docs/18/pgupgrade.html)
Excerpt:
```text
Then, use vacuumdb --all --analyze-only to ensure all relations have updated cumulative statistics for triggering vacuum and analyze.
```
- [https://www.postgresql.org/docs/18/pgupgrade.html](https://www.postgresql.org/docs/18/pgupgrade.html)
Excerpt:
```text
This does not transfer all statistics, such as those created explicitly with CREATE STATISTICS , custom statistics added by an extension, or statistics collected by the cumulative statistics system.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F16
### F18 · Accurate · Factual · The displayed reltuples value rounds correctly to 10 million rows
Location: excerpt · section “Let's test it” · as fetched 2026-10-19 · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=9.999034e%2B06)
Article says:
```text
…9.999034e+06…
```
What is true:
9.999034e+06 equals 9,999,034 rows. The difference from 10 million rows is 966 rows, or 0.00966%. The approximation is correct. This arithmetic does not independently verify the recorded measurement.
Charitable reading:
The approximation describes the stored reltuples value. It does not establish the execution planner's resulting row estimate.
Review: We recalculated the difference as 966 rows, or 0.00966% of 10 million rows. The finding verifies arithmetic without claiming independent measurement validation. We recalculated the exponent, difference, and percentage. All are correct. The finding distinguishes valid arithmetic from independent measurement verification.
Sources:
- [REL_18_3 · src/include/catalog/pg_class.h:32-71](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/include/catalog/pg_class.h#L32-L71)
Excerpt:
```text
/* # of tuples (not always up-to-date; -1 means "unknown") */
float4 reltuples BKI_DEFAULT(-1);
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F18
## Notes (not graded) (4)
### F3 · Note · · Note: “…your upgraded cluster starts with optimal query plans from the first second…”
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=your%20upgraded%20cluster%20starts%20with,plans%20from%20the%20first%20second)
Article says:
```text
…your upgraded cluster starts with optimal query plans from the first second…
```
What is true:
PG18 documentation promises transfer of most optimizer statistics, not optimal plans. The article also explicitly runs ANALYZE before logical-upgrade cutover. That qualification limits the charge. The absolute optimal-plan wording remains unsupported by E-16 and E-27.
So what:
Validate representative query plans after upgrading. Complete both analysis passes before accepting performance equivalence.
Explanation: Not graded: no reader would act differently on it.
Review: The surrounding article explicitly runs ANALYZE before logical-upgrade cutover. Missing transferred statistics do not establish that workflow's alleged first-second problem. We read the surrounding upgrade-method discussion. The article explicitly places ANALYZE before cutover for logical upgrades. Missing pg_upgrade statistics do not establish missing statistics at that cutover. The optimal-plan wording remains too absolute.
Sources:
- [REL_18_3 · doc/src/sgml/ref/pgupgrade.sgml:834-839](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/doc/src/sgml/ref/pgupgrade.sgml#L834-L839)
Excerpt:
```text
Unless the <option>--no-statistics</option> option is specified,
<command>pg_upgrade</command> will transfer most optimizer statistics
from the old cluster to the new cluster. This does not transfer
all statistics, such as those created explicitly with
<xref linkend="sql-createstatistics"/>, custom statistics added by
an extension, or statistics collected by the cumulative statistics system.
```
- [REL_18_3 · doc/src/sgml/ref/pgupgrade.sgml:850-856](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/doc/src/sgml/ref/pgupgrade.sgml#L850-L856)
Excerpt:
```text
First, use
<command>vacuumdb --all --analyze-in-stages --missing-stats-only</command>
to quickly generate minimal optimizer statistics for relations without
any. Then, use <command>vacuumdb --all --analyze-only</command> to ensure
all relations have updated cumulative statistics for triggering vacuum and
analyze. For both commands, the use of <option>--jobs</option> can speed
it up.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F3
### F9 · Note · · Note: “…standard system catalog views…”
Location: excerpt · section “Why it works” · as fetched 2026-10-19 · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=standard%20system%20catalog%20views)
Article says:
```text
…standard system catalog views…
```
What is true:
doc/src/sgml/catalogs.sgml:1891 identifies pg_class as a catalog (E-28). REL_14_24 src/backend/catalog/system_views.sql:189 explicitly defines pg_stats with CREATE VIEW (E-31). Calling both objects views mislabels pg_class.
Explanation: Not graded: knowing this would not change what a reader does.
Review: We checked the catalog description and CREATE VIEW declaration. They support the terminology correction. E-31 ends before the FROM clause, so it does not establish the additional assertion about underlying statistics catalogs. Retain the note with that assertion removed.
Sources:
- [REL_18_3 · doc/src/sgml/catalogs.sgml:1883-1962](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/doc/src/sgml/catalogs.sgml#L1883-L1962)
Excerpt:
```text
The catalog <structname>pg_class</structname> describes tables and
other objects that have columns or are otherwise similar to a
table.
```
- [REL_14_24 · src/backend/catalog/system_views.sql:183-201](https://github.com/postgres/postgres/blob/6b3806732b7c5df06bdd0ed150e8a07b4ad62315/src/backend/catalog/system_views.sql#L183-L201)
Qualification: Version note: Checked the article's PostgreSQL 14 source-version floor.
Excerpt:
```text
CREATE VIEW pg_stats WITH (security_barrier) AS
SELECT
nspname AS schemaname,
relname AS tablename,
attname AS attname,
stainherit AS inherited,
stanullfrac AS null_frac,
stawidth AS avg_width,
stadistinct AS n_distinct,
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F9
### F11 · Note · · The documented all-relations pass excludes unlisted partitioned parents
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=The%20second%20command%20analyzes%20all%20relations)
Article says:
```text
The second command analyzes all relations…
```
What is true:
PG18 vacuumdb selects ordinary tables and materialized views when no tables are listed. src/bin/scripts/vacuumdb.c:917 excludes partitioned parents from that selection. The article repeats the official all-relations wording. Partitioned parents can still require explicit ANALYZE.
So what:
Run ANALYZE on partitioned parent tables explicitly after the two documented vacuumdb passes.
Charitable reading:
The article repeats the pinned official documentation, which also says all relations. The article previously warns about partitioned tables.
Explanation: Not graded: no reader would act differently on it.
Review: We checked whether partitioned parents enter the default selection. vacuumdb.c excludes them unless tables are explicitly selected. The note fairly acknowledges identical wording in official documentation. We checked the explicit-table exception and default relation filter. Partitioned parents are excluded. Note severity properly recognizes the official documentation's identical wording.
Sources:
- [REL_18_3 · doc/src/sgml/ref/pgupgrade.sgml:850-856](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/doc/src/sgml/ref/pgupgrade.sgml#L850-L856)
Excerpt:
```text
First, use
<command>vacuumdb --all --analyze-in-stages --missing-stats-only</command>
to quickly generate minimal optimizer statistics for relations without
any. Then, use <command>vacuumdb --all --analyze-only</command> to ensure
all relations have updated cumulative statistics for triggering vacuum and
analyze. For both commands, the use of <option>--jobs</option> can speed
it up.
```
- [REL_18_3 · src/bin/scripts/vacuumdb.c:850-930](https://github.com/postgres/postgres/blob/62d6c7d3df6287f1bd83199c1a746e50d31571a0/src/bin/scripts/vacuumdb.c#L850-L930)
Excerpt:
```text
appendPQExpBufferStr(&catalog_query,
" AND c.relkind OPERATOR(pg_catalog.=) ANY (array["
CppAsString2(RELKIND_RELATION) ", "
CppAsString2(RELKIND_MATVIEW) "])\n");
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F11
### F17 · Note · · The linked CYBERTEC page lacks the quoted timing estimate
Location: excerpt · section “The problem: upgrading Postgres has always meant losing statistics” · as fetched 2026-10-19 · [open in article](https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions#:~:text=the%20post%2Dupgrade%20analyze%20could%20take%20hours.)
Article says:
```text
…the post-upgrade analyze could take hours.
```
What is true:
The linked CYBERTEC article discusses analysis delays but does not contain the quoted hours-long estimate. Its text supports a qualitative delay, without that duration or database-size example.
Charitable reading:
The timing estimate may be reasonable, but quotation marks attribute specific wording to the linked CYBERTEC article.
Explanation: Not graded: knowing this would not change what a reader does.
Review: We read the complete retrieved page, including comments. It lacks the attributed hours-long estimate and database-size example. The note correctly leaves the estimate's plausibility undecided. We read the complete linked page for the attributed duration and database size. Neither appears. The note correctly avoids disproving the timing estimate itself.
Sources:
- [https://www.cybertec-postgresql.com/en/preserve-optimizer-statistics-during-major-upgrades-with-postgresql-v18/](https://www.cybertec-postgresql.com/en/preserve-optimizer-statistics-during-major-upgrades-with-postgresql-v18/)
Excerpt:
```text
The additional delay used to be particularly annoying, since pg_upgrade is supposed to be a fast upgrade technique.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713#F17
## Withdrawn findings (0)
None.
## Section checks
- Overview · A · 1 verified-accurate · 100% of claims (4 of 4, plus 4 that need data we do not have)
- Upgrade problem · A · 1 imprecise · 2 verified-accurate · 85% of claims (6 of 7, plus 7 that need data we do not have)
- PG18 changes · A · 1 verified-accurate · 100% of claims (2 of 2, plus 1 that need data we do not have)
- Demonstration · B+ · 1 inaccuracy · 1 verified-accurate · 87% of claims (7 of 8, plus 8 that need data we do not have)
- How it works · A · 4 verified-accurate · 87% of claims (14 of 16, plus 5 that need data we do not have)
- Caveats · A · 3 verified-accurate · 100% of claims (12 of 12, plus 4 that need data we do not have)
- Upgrade planning · A · none · 100% of claims (3 of 3)
## Claim coverage
- Overview: 4 of 4 Postgres claims checked, plus 4 that need data we do not have; not counted: 1 product or opinion, 4 not a claim
- Upgrade problem: 6 of 7 Postgres claims checked, plus 7 that need data we do not have; not counted: 2 product or opinion, 4 duplicate; not checked: 1 for other reasons
- PG18 changes: 2 of 2 Postgres claims checked, plus 1 that need data we do not have; not counted: 3 duplicate, 1 not a claim
- Demonstration: 7 of 8 Postgres claims checked, plus 8 that need data we do not have; not counted: 2 product or opinion, 4 duplicate, 1 not a claim; not checked: 1 for other reasons
- How it works: 14 of 16 Postgres claims checked, plus 5 that need data we do not have; not counted: 1 product or opinion, 2 duplicate; not checked: 2 for other reasons
- Caveats: 12 of 12 Postgres claims checked, plus 4 that need data we do not have
- Upgrade planning: 3 of 3 Postgres claims checked; not counted: 7 product or opinion, 2 duplicate, 1 not a claim
- Corrections: 1 of 10 Postgres claims checked; not counted: 4 product or opinion, 32 duplicate, 10 not a claim; not checked: 9 for other reasons
## What we did not check
- We did not reproduce the Docker demonstration or its displayed measurements.
- We did not verify the reported upgrade incidents or their causes.
- We did not measure the claimed export overhead for thousands of tables.
- We did not verify the vendor's zero-downtime upgrade implementation.
- We did not verify the two incident accounts linked through social posts.
- We did not verify statistics transfer separately from PostgreSQL 14, 15, 16, and 17.
- We did not reproduce the demonstration or measure statistics-export overhead.
- We did not establish every function's introduction version or verify the cited commit authorship.
- We did not read the linked Azure upgrade guidance.
- We did not independently verify the advertised upgrade guarantees or customer workload figures.
- We did not verify whether the proposed upgrade workflow produces optimal query plans.
- We did not reproduce the demo's 9,999,034-row estimate, 83,392-page count, or zero-row result.
- We did not measure statistics-transfer overhead for schemas containing thousands of tables.
- We did not verify hours-long ANALYZE runtimes against production measurements.
- Section “Corrections”: we checked 1 of 10 checkable claims.
- We could not decide whether the article contains a material benchmark.
- We could not decide whether the article depends on finding F1.
- We hold no source mapping for “postgres-ai/docs”, so we did not check the article's claims about its code.
## Notes
- A- — the findings address the article's main subject. What we did not check is listed below. We checked PG18 statistics transfer, source-version handling, restore functions, and post-upgrade analysis against source code and documentation.
- We did not check everything in this article. What we did not check is listed below, in the words we recorded at the time. None of it moved the letter. We never charge our own limits to the article.
- Average of 5 axes: 3.86 · worst of factual, consistent: B+ · result A-
- Some explanatory text is not shown in this edition; the grade and findings are complete.
- Some checks did not happen for this edition, and each one we know of is listed above.
- Checked against: github.com/postgres/postgres REL_18_3 at commit 62d6c7d3df6287f1bd83199c1a746e50d31571a0 (pinned target); https://commitfest.postgresql.org/patch/5871/ (fetched 2026-10-19T06:27:06.160150Z); https://postgres.ai/ (fetched 2026-10-19T06:27:23.607257Z); https://postgres.ai/blog/tags/major-upgrades (fetched 2026-10-19T06:27:29.023185Z); https://postgres.ai/blog/tags/performance (fetched 2026-10-19T06:27:28.277745Z); https://postgres.ai/blog/tags/pg-upgrade (fetched 2026-10-19T06:27:27.511331Z); https://postgres.ai/blog/tags/postgre-sql (fetched 2026-10-19T06:27:26.712220Z); https://postgres.ai/consulting (fetched 2026-10-19T06:27:24.341433Z); https://postgres.ai/products/postgres-ai-zdu (fetched 2026-10-19T06:27:04.353686Z); https://repost.aws/knowledge-center/aurora-postgresql-major-upgrade-cpu (fetched 2026-10-19T06:27:13.561711Z); https://www.cybertec-postgresql.com/en/preserve-optimizer-statistics-during-major-upgrades-with-postgresql-v18/ (fetched 2026-10-19T06:27:08.769847Z); https://www.endpointdev.com/blog/2016/12/postgres-statistics-and-pain-of-analyze/ (fetched 2026-10-19T06:27:07.626916Z); https://www.postgresql.org/about/news/postgresql-18-released-3142/ (fetched 2026-10-19T06:27:14.495472Z); https://www.postgresql.org/docs/18/pgupgrade.html (fetched 2026-10-19T06:27:22.776331Z); https://www.postgresql.org/docs/current/app-pgdump.html (fetched 2026-10-19T06:27:17.473797Z).
- Article captured 2026-10-19T06:26:45.376889Z · SHA-256 3101c5bda759b35d1b13fd4f3beaaf16f2e16a94da700586fe9c3aa74a2bf9bd · Text extracted from the article's HTML.
- Policy SHA-256 867e7ab632ff62a2965dd206bcd30a5da7246d72e07f4f67ab4d2774fd9f9186 · Grading rules SHA-256 6fb334e79d6b9e7ed81d3238cc10d9de602ff87ed65ff2fa781f53bac5798765.
- We did not reproduce the Docker demonstration or its displayed measurements.
- We did not test separate upgrades from PostgreSQL 14, 15, 16, and 17.
- We did not measure statistics-export overhead for schemas containing thousands of tables.
- We did not verify the reported upgrade incidents, their causes, or hours-long ANALYZE runtimes.
- We did not read the linked Azure upgrade guidance.
- We did not verify the advertised upgrade guarantees, customer workload figures, or upgrade implementation.
- The article gives a publication date without a time. We list that date at midnight UTC.
- article target version: bound to the most-cited major; also named 2 (2×), 19 (1×), 16 (1×)
- source: postgres 18 was read at REL_18_3, its newest release when the article was published
- source: we did not check the article's claims about a linked GitLab project against its source code, because we keep no copy of it
- 4 fetched pages are not listed above, because our policy does not allow linking them.
- review: the findings were written by one model and reviewed independently by a different model.
- 2026-10-27: Regraded under the current grading rules: the letter is the average of the axis letters, with every cap stated under it.
- 7 passages in this edition fell short of our own plain-English rules.
- Built from the article text captured above, one pinned source tree, and 14 fetched pages.
- 16 survived · 2 weakened · 0 withdrawn.
## Revision history
- [Revision 1](https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713?v=48) · 2026-09-09 01:14 UTC · B · audit version not recorded · regrade version not recorded
Article as first submitted. 13 accurate · 1 wrong · 7 caveats.
ElephantSeal: B.
Changes: First audit. Open: F1 “…with Nathan Bossart's follow-up pg_restore_extended_stats() ) also handles version differences gracefully…” (false); F2 “The second command re-analyzes everything, which is still worthwhile: the new major version may have improved statistics collection algorithms…” (mostly accurate); F3 “…to quickly regenerate only the statistics that were not carried over — extended statistics and expression index stats.” (mostly accurate); F4 “From the release notes : "Before PostgreSQL 18, these statistics didn't carry over on a major version upgrade…” (mostly accurate); F13 “…Postgres 18 introduces statistics export and import. From the release notes :…” (mostly accurate); F16 “…with Nathan Bossart's follow-up pg_restore_extended_stats()…” (mostly accurate); F17 “…it's only the multi-column extended stats that require re-analysis…” (mostly accurate); F19 “From the release notes :…” (mostly accurate).
- [Revision 2](https://pgtrue.postgres.ai/shared/brief/66dcbec1-e338-4b08-8207-c3dd1d527713?v=54) · this page · 2026-10-19 06:26 UTC · A- · audited with v1.0.14 (approx.) · regraded with v1.1.0 (approx.)
Article text changed. 12 accurate · 1 wrong · 1 caveat.
ElephantSeal: A-.
Changes: No longer reported: “…with Nathan Bossart's follow-up pg_restore_extended_stats() ) also handles version differences gracefully…”; “The second command re-analyzes everything, which is still worthwhile: the new major version may have improved statistics collection algorithms…”; “…to quickly regenerate only the statistics that were not carried over — extended statistics and expression index stats.”; “From the release notes : "Before PostgreSQL 18, these statistics didn't carry over on a major version upgrade…”; “…Postgres 18 introduces statistics export and import. From the release notes :…”; “…with Nathan Bossart's follow-up pg_restore_extended_stats()…”; “…it's only the multi-column extended stats that require re-analysis…”; “From the release notes :…”. New: F1 “The empty-table catalog query does not show a 10-million-row planner estimate” (false); F2 “Increasing default_statistics_target does not proportionally increase every ANALYZE runtime” (mostly accurate).