Re: WIP: new system catalog pg_wait_event

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: WIP: new system catalog pg_wait_event
Дата
Msg-id ZNy8VDoXcMxgJvrg@paquier.xyz
обсуждение исходный текст
Ответ на Re: WIP: new system catalog pg_wait_event  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
Ответы Re: WIP: new system catalog pg_wait_event  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Drouvot, Bertrand"
Дата:
Сообщение: Re: WIP: new system catalog pg_wait_event
Следующее
От: Shaun Thomas
Дата:
Сообщение: Re: Logging of matching pg_hba.conf entry during auth skips trust auth, potential security issue