]> git.ipfire.org Git - thirdparty/postgresql.git/commit
pg_dump: Simplify query for retrieving attribute statistics.
authorNathan Bossart <nathan@postgresql.org>
Tue, 17 Mar 2026 16:32:40 +0000 (11:32 -0500)
committerNathan Bossart <nathan@postgresql.org>
Tue, 17 Mar 2026 16:32:40 +0000 (11:32 -0500)
commit4b5ba0c4ca5244d0ed589f67baf0204957886e6b
tree8f830ee1b8c633430f8534058ed8c701fcfef371
parent2eb6cd327caea42b5f29e0b16d6053c52aa08c3c
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
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h