From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com> |
Cc: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: WIP: new system catalog pg_wait_event |
Date: | 2023-08-16 12:08:52 |
Message-ID: | ZNy8VDoXcMxgJvrg@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Aug 16, 2023 at 01:43:35PM +0200, Drouvot, Bertrand wrote:
> Yeah, agree, done that way in v6 (also added a test in 001_worker_spi.pl
> to ensure that "worker_spi_main" is reported in pg_wait_event).
-typedef struct WaitEventExtensionEntryByName
-{
- char wait_event_name[NAMEDATALEN]; /* hash key */
- uint16 event_id; /* wait event ID */
-} WaitEventExtensionEntryByName;
I'd rather keep all these structures local to wait_event.c, as these
cover the internals of the hash tables.
Could you switch GetWaitEventExtensionEntries() so as it returns a
list of strings or an array of char*? We probably can live with the
list for that.
+ char buf[NAMEDATALEN + 44]; //"Custom wait event \"%Name%\" defined by extension" +
Incorrect comment. This would be simpler as a StringInfo.
Thanks for the extra test in worker_spi looking at the contents of the
catalog.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Shaun Thomas | 2023-08-16 13:26:55 | Re: Logging of matching pg_hba.conf entry during auth skips trust auth, potential security issue |
Previous Message | Drouvot, Bertrand | 2023-08-16 11:43:35 | Re: WIP: new system catalog pg_wait_event |