Multiple Wait Events for extensions - Mailing list pgsql-hackers

From legrand legrand
Subject Multiple Wait Events for extensions
Date
Msg-id 1540229294286-0.post@n3.nabble.com
Whole thread Raw
Responses Re: Multiple Wait Events for extensions  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Hello,
I'm playing with adding into my pg_stat_statements extension a wait event
for pgss time duration (pgss_store)
 Adding pgstat_report_wait_start(PG_WAIT_EXTENSION) 
 gives wait type = "Extension" / event name "Extension"
and that's perfect.

Now I would like to add a second wait event (for exemple a Planner
information based on planner_hook)
Yes I know it's not a "wait", but that's not even possible because 
there is only one event type and one event name available for all extensions
...


Could this be changed to offer an extension the ability to log multiple
events 
and many extensions to work together ?

What about a pgstat_report_extension_wait_start(i) function
displaying Wait type = "Extension name"
and a predifined event numbers (i in the range 1 to 10)  as event name ?

I'm not able to write it, but I'm ready to test it deeply ;o)
Regards
PAscal



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line
Next
From: Andres Freund
Date:
Subject: Re: pgsql: Avoid duplicate XIDs at recovery when building initialsnapshot