Summary Sort workers Stats in EXPLAIN ANALYZE

From: Jian Guo <gjian(at)vmware(dot)com>
To: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Zhenghua Lyu <zlyu(at)vmware(dot)com>
Subject: Summary Sort workers Stats in EXPLAIN ANALYZE
Date: 2022-03-21 03:36:17
Message-ID: BL0PR05MB5188210988EA15126C255B6DC4169@BL0PR05MB5188.namprd05.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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 Content-Type Size
0001-Summary-Sort-workers-Stats.patch text/x-patch 2.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2022-03-21 03:36:40 Re: [PATCH] add relation and block-level filtering to pg_waldump
Previous Message Amit Kapila 2022-03-21 03:25:51 Re: Skipping logical replication transactions on subscriber side