Re: Summary Sort workers Stats in EXPLAIN ANALYZE - Mailing list pgsql-hackers

From Jian Guo
Subject Re: Summary Sort workers Stats in EXPLAIN ANALYZE
Date
Msg-id SN6PR05MB5199C4190643F55C00E3CC0EC4169@SN6PR05MB5199.namprd05.prod.outlook.com
Whole thread Raw
In response to Summary Sort workers Stats in EXPLAIN ANALYZE  (Jian Guo <gjian@vmware.com>)
Responses Re: Summary Sort workers Stats in EXPLAIN ANALYZE  (Jian Guo <gjian@vmware.com>)
List pgsql-hackers
There is some problem with the last patch, I have removed the `ExplainOpenWorker` call to fix.

And also, I have added a test case in explain.sql​ according to the code change.

From: Jian Guo <gjian@vmware.com>
Sent: Monday, March 21, 2022 11:36
To: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Cc: Zhenghua Lyu <zlyu@vmware.com>
Subject: Summary Sort workers Stats in EXPLAIN ANALYZE
 

In current EXPLAIN ANALYZE implementation, the Sort Node stats from each workers are not summarized: https://github.com/postgres/postgres/blob/d4ba8b51c76300f06cc23f4d8a41d9f7210c4866/src/backend/commands/explain.c#L2762

When the worker number is large, it will print out huge amount of node details in the plan. I have created this patch to summarize the tuplesort stats by AverageSpaceUsed / PeakSpaceUsed, make it behave just like in `show_incremental_sort_group_info()`: https://github.com/postgres/postgres/blob/d4ba8b51c76300f06cc23f4d8a41d9f7210c4866/src/backend/commands/explain.c#L2890

Attachment

pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: add checkpoint stats of snapshot and mapping files of pg_logical dir
Next
From: Michail Nikolaev
Date:
Subject: Re: Patch proposal - parameter to limit amount of FPW because of hint bits per second