pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_dump: Fix query for gathering attribute stats on older versio
Date: Sat, 05 Apr 2025 02:06:14 +0000
Message-ID: <E1u0svG-002j6D-0F@gemulon.postgresql.org> (raw)

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.huinker@gmail.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(-)



Message-ID: <E1u0svG-002j6D-0F@gemulon.postgresql.org>
Permalink:  ../E1u0svG-002j6D-0F@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1u0svG-002j6D-0F@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: pg_dump: Fix query for gathering attribute stats on older versio
  In-Reply-To: <E1u0svG-002j6D-0F@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox