pg_dump: prepare attribute stats query.

Jeff Davis <jdavis@postgresql.org>

Commit: 6ee3b91bad269b8f1acee38607bd17923efd6e06
Author: Jeff Davis <jdavis@postgresql.org>
Date: 2025-02-26T03:52:11Z
Releases: 18.0
pg_dump: prepare attribute stats query.

Follow precedent in pg_dump for preparing queries to improve
performance. Also, simplify the query by removing unnecessary joins.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reported-by: Andres Freund <andres@anarazel.de>
Co-authored-by: Corey Huinker <corey.huinker@gmail.com>
Co-authored-by: Jeff Davis <pgsql@j-davis.com>
Discussion: https://postgr.es/m/CADkLM=dRMC6t8gp9GVf6y6E_r5EChQjMAAh_vPyih_zMiq0zvA@mail.gmail.com

Files

PathChange+/−
src/bin/pg_dump/pg_backup.h modified +1 −0
src/bin/pg_dump/pg_dump.c modified +57 −66

Discussion