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