Re: Can we use Statistics Import and Export feature to perforamance testing?
Corey Huinker <corey.huinker@gmail.com>
From: Corey Huinker <corey.huinker@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: "Ryohei Takahashi (Fujitsu)" <r.takahashi_2@fujitsu.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2025-04-12T08:29:42Z
Lists: pgsql-hackers
> > at the *actual size* of the relation and takes that into account when > scaling the statistics (see table_block_relation_estimate_size() in > tableam.c). If the table sizes don't match between the two servers > then there's no guarantees the planner will produce the same plan. > Sorry that I didn't see this thread until now. I would like to note that table_block_relation_estimate_size() determines the actual size of the relation by asking pg_class, and the relevant values there are set by pg_restore_relation_stats().