Can we use Statistics Import and Export feature to perforamance testing?

From: "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Can we use Statistics Import and Export feature to perforamance testing?
Date: 2025-04-08 00:20:58
Message-ID: TY3PR01MB118914FCCBBDC126C34AA287382B52@TY3PR01MB11891.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I have a question about Statistics Import and Export.

* Background
I'm working for PGEcons[1], which is the PostgreSQL consortium in Japan.
Several companies participating in PGEcons have the following request for PostgreSQL.

They have two environments, production environment and staging environment.
Production environment has real customer's data and staging environment has dummy testing data.
When adding some application, they want to run the performance test on staging environment and
then apply to the production environment.
In the performance test, they want to use the same statistics as the production environment
to reduce the trouble in production environment.

* Question
By using Statistics Import and Export feature, is it possible to achieve the above request by following procedure?

(1) Export the statistics from production environment by using pg_dump --statistics-only.
(2) On the staging environment, set the autovacuum related parameters to prevent autovacuum from running.
(3) Import the statistics to staging environment by using the result of (1).

[1] PGECons is a non profit organization comprised of companies
in Japan to promote PostgreSQL (https://www.pgecons.org)

Regards,
Ryohei Takahashi

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rushabh Lathia 2025-04-08 00:21:49 Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints
Previous Message Peter Smith 2025-04-08 00:20:01 Re: Parallel heap vacuum