Re: Custom explain options - Mailing list pgsql-hackers

From Konstantin Knizhnik
Subject Re: Custom explain options
Date
Msg-id 56379b8e-bfcf-4207-928e-93290b65c63b@garret.ru
Whole thread Raw
In response to Re: Custom explain options  (Andrei Lepikhov <a.lepikhov@postgrespro.ru>)
List pgsql-hackers
On 10/01/2024 8:29 am, Andrei Lepikhov wrote:
> On 30/11/2023 22:40, Konstantin Knizhnik wrote:
>> In all this cases we are using array of `Instrumentation` and if it 
>> contains varying part, then it is not clear where to place it.
>> Yes, there is also code which serialize and sends instrumentations 
>> between worker processes  and I have updated this code in my PR to 
>> send actual amount of custom instrumentation data. But it can not 
>> help with the cases above.
> What do you think about this really useful feature? Do you wish to 
> develop it further?
>
In Neon (cloud Postgres) we have changed Postgres core to include in 
explain information about prefetch and local file cache.
EXPLAIN seems to be most convenient way for users to get this 
information which can be very useful for investigation of query 
execution speed.
So my intention was to make it possible to add extra information to 
explain without patching Postgres core.
Existed explain hook is not enough for it.

I am not sure that the suggested approach is flexible enough. First of 
all I tried to make it is simple as possible, minimizing changes in 
Postgres core.




pgsql-hackers by date:

Previous
From: Dagfinn Ilmari Mannsåker
Date:
Subject: Re: System username in pg_stat_activity
Next
From: Magnus Hagander
Date:
Subject: Re: System username in pg_stat_activity