From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_dump: Simplify query for retrieving attribute statistics.
Date: Tue, 17 Mar 2026 16:33:35 +0000
Message-ID: <E1w2XMM-000BlE-2T@gemulon.postgresql.org> (raw)
pg_dump: Simplify query for retrieving attribute statistics.
This query fetches information from pg_stats, which did not return
table OIDs until recent commit 3b88e50d6c. Because of this, we had
to cart around arrays of schema and table names, and we needed an
extra filter clause to hopefully convince the planner to use the
correct index. With the introduction of pg_stats.tableid, we can
instead just use an array of OIDs, and we no longer need the extra
filter clause hack.
Author: Corey Huinker <corey.huinker@gmail.com>
Reviewed-by: Sami Imseih <samimseih@gmail.com>
Discussion: https://postgr.es/m/CADkLM%3DcoCVy92QkVUUTLdo5eO2bMDtwMrzRn_8miAhX%2BuPaqXg%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4b5ba0c4ca5244d0ed589f67baf0204957886e6b
Modified Files
--------------
src/bin/pg_dump/pg_dump.c | 65 ++++++++++++++++++++++++++++++++++++++---------
src/bin/pg_dump/pg_dump.h | 1 +
2 files changed, 54 insertions(+), 12 deletions(-)
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: Simplify query for retrieving attribute statistics.
In-Reply-To: <E1w2XMM-000BlE-2T@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