show size of DSAs and dshash tables in pg_dsm_registry_allocations

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема show size of DSAs and dshash tables in pg_dsm_registry_allocations
Дата
Msg-id aSeEDeznAsHR1_YF@nathan
обсуждение исходный текст
Ответы Re: show size of DSAs and dshash tables in pg_dsm_registry_allocations
Список pgsql-hackers
On Tue, Nov 25, 2025 at 07:13:03PM -0500, Robert Haas wrote:
> In my ideal world, it would probably show partially-initialized entires
> in some distinguishable way, like with a null size.

I reevaluated this view, and I think we can do what you suggest here.
Right now, we show NULL for DSAs and dshash tables because 1) we might not
be attached to them and 2) we don't have a pointer to the dsa_area * or
dshash_table * in local memory.  If we introduce a function that looks up
the size of a DSA given its handle (transiently attaching to the control
segment if needed), we can show the size for all successfully-initialized
entries.  Then, we can make NULL mean that the entry was
partially-initialized.

Patch attached.

-- 
nathan

Вложения

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