pgsql: pg_dump: Fix query for gathering attribute stats on older versio

From: Nathan Bossart <nathan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_dump: Fix query for gathering attribute stats on older versio
Date: 2025-04-05 02:06:14
Message-ID: E1u0svG-002j6D-0F@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_dump: Fix query for gathering attribute stats on older versions.

Commit 9c02e3a986 taught pg_dump to retrieve attribute statistics
for 64 relations at a time. pg_dump supports dumping from v9.2 and
newer versions, but our query for retrieving statistics for
multiple relations uses WITH ORDINALITY and multi-argument
UNNEST(), both of which were introduced in v9.4. To fix, we resort
to gathering statistics for a single relation at a time on versions
older than v9.4.

Per buildfarm member crake.

Author: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
Discussion: https://postgr.es/m/Z_BcWVMvlUIJ_iuZ%40nathan

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f0d0083f52f994989b1bb6723e7bd0fad9f586cd

Modified Files
--------------
src/bin/pg_dump/pg_dump.c | 38 ++++++++++++++++++++++++++++++--------
1 file changed, 30 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2025-04-05 06:10:10 Re: pgsql: Prevent redeclaration of typedef TocEntry.
Previous Message Tom Lane 2025-04-05 00:11:59 pgsql: Repair misbehavior with duplicate entries in FK SET column lists