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 <t...@sss.pgh.pa.us>
Reported-by: Andres Freund <and...@anarazel.de>
Co-authored-by: Corey Huinker <corey.huin...@gmail.com>
Co-authored-by: Jeff Davis <pg...@j-davis.com>
Discussion: 
https://postgr.es/m/CADkLM=drmc6t8gp9gvf6y6e_r5echqjmaah_vpyih_zmiq0...@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6ee3b91bad269b8f1acee38607bd17923efd6e06

Modified Files
--------------
src/bin/pg_dump/pg_backup.h |   1 +
src/bin/pg_dump/pg_dump.c   | 123 ++++++++++++++++++++------------------------
2 files changed, 58 insertions(+), 66 deletions(-)

Reply via email to