Re: Support to define custom wait events for extensions

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Support to define custom wait events for extensions
Дата
Msg-id ZNLJwViP14/4zcBx@paquier.xyz
обсуждение исходный текст
Ответ на Re: Support to define custom wait events for extensions  (Andres Freund <andres@anarazel.de>)
Ответы Re: Support to define custom wait events for extensions  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Tue, Aug 08, 2023 at 03:59:54PM -0700, Andres Freund wrote:
> On 2023-08-08 08:54:10 +0900, Michael Paquier wrote:
>> - WaitEventExtensionShmemInit() should gain a dshash_create(), to make
>> sure that the shared table is around, and we are going to have a
>> reference to it in WaitEventExtensionCounterData, saved from
>> dshash_get_hash_table_handle().
>
> I'm not even sure it's worth using dshash here. Why don't we just create a
> decently sized dynahash (say 128 enties) in shared memory? We overallocate
> shared memory by enough that there's a lot of headroom for further entries, in
> the rare cases they're needed.

The question here would be how many slots the most popular extensions
actually need, but that could always be sized up based on the
feedback.

>> We are going to need a fixed size for these custom strings, but perhaps a
>> hard limit of 256 characters for each entry of the hash table is more than
>> enough for most users?
>
> I'd just use NAMEDATALEN.

Both suggestions WFM.
--
Michael

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Support to define custom wait events for extensions
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: pgbench: allow to exit immediately when any client is aborted