pg_upgrade from pg19 source build to pg19-beta3 throws an error

From: mailinglists <lists(at)database(dot)one>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: pg_upgrade from pg19 source build to pg19-beta3 throws an error
Date: 2026-08-16 16:48:48
Message-ID: 780FDDD4-212C-450C-AB0A-A69E88EC1BCE@database.one
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Trying an pg_upgrade from pg19 source build (from februari 2026) to pg19-beta3
Environment: Ubuntu 24.04.4 LTS (GNU/Linux 6.8.0-137-generic aarch64) fully patched and updated,
running inside a UTM (qemu) VM on apple-silicon M4.

moved the older build and data to *-bku directories, did the whole configure compile install dance including
contrib/pg_stat_statements , contrib/auto_explain and contrib/pgcrypto
initdb went ok,
but on
$PGBIN/pg_upgrade --new-datadir $PGDATA --old-datadir ~/pg-data-bku/ --new-bindir $PGBIN --old-bindir ~/pg-install-bku/bin —link
I get

Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database connection settings ok
Checking for unsupported encodings ok
Checking database user is the install user ok
Checking for prepared transactions ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking logical replication slots ok
Checking subscription state ok
Checking data type usage ok
Checking for objects affected by Unicode update ok
Creating dump of global objects ok
Creating dump of database schemas
test
*failure*

Consult the last few lines of "/home/ellert/pg-data/pg_upgrade_output.d/20260816T162150.180/log/pg_upgrade_dump_16384.log" for
the probable cause of the failure.
Failure, exiting

contents of the log file:

command: "/home/ellert/pg-install/bin/pg_dump" --host /home/ellert --port 50432 --username ellert --no-data --sequence-data --quote-all-identifiers --binary-upgrade --format=custom --statistics --no-sync --file="/home/ellert/pg-data/pg_upgrade_output.d/20260816T162150.180/dump/pg_upgrade_dump_16384.custom" 'dbname=test' >> "/home/ellert/pg-data/pg_upgrade_output.d/20260816T162150.180/log/pg_upgrade_dump_16384.log" 2>&1
pg_dump: error: query failed: ERROR: column s.tableid does not exist
LINE 2: ...unnest($1) WITH ORDINALITY AS u (tableid, ord) ON s.tableid ...
^
HINT: Perhaps you meant to reference the column "u.tableid".
pg_dump: detail: Query was: PREPARE getAttributeStats(pg_catalog.oid[]) AS
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, s.most_common_elems, s.most_common_elem_freqs, s.elem_count_histogram, s.range_length_histogram, s.range_empty_frac, s.range_bounds_histogram FROM pg_catalog.pg_stats s JOIN unnest($1) WITH ORDINALITY AS u (tableid, ord) ON s.tableid = u.tableid ORDER BY u.ord, s.attname, s.inherited

A quick google search finds the offending piece of SQL possibly in the source of pg_dump.c.
Have i encountered an actual issue, or is it me ?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ayush Tiwari 2026-08-16 17:10:33 Re: Make tsqueryout() use a StringInfo
Previous Message Tom Lane 2026-08-16 16:21:59 Residual tsquery cleanups