Re: WIP: new system catalog pg_wait_event - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: WIP: new system catalog pg_wait_event
Date
Msg-id ZNy8VDoXcMxgJvrg@paquier.xyz
Whole thread Raw
In response to Re: WIP: new system catalog pg_wait_event  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
Responses Re: WIP: new system catalog pg_wait_event
List 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

Attachment

pgsql-hackers by date:

Previous
From: "Drouvot, Bertrand"
Date:
Subject: Re: WIP: new system catalog pg_wait_event
Next
From: Shaun Thomas
Date:
Subject: Re: Logging of matching pg_hba.conf entry during auth skips trust auth, potential security issue