Re: Parent/child context relation in pg_get_backend_memory_contexts()

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Parent/child context relation in pg_get_backend_memory_contexts()
Дата
Msg-id ZcxqerWx_jDZgtDQ@paquier.xyz
обсуждение исходный текст
Ответ на Re: Parent/child context relation in pg_get_backend_memory_contexts()  (torikoshia <torikoshia@oss.nttdata.com>)
Ответы Re: Parent/child context relation in pg_get_backend_memory_contexts()  (Melih Mutlu <m.melihmutlu@gmail.com>)
Re: Parent/child context relation in pg_get_backend_memory_contexts()  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Fri, Jan 19, 2024 at 05:41:45PM +0900, torikoshia wrote:
> We already have additional description below the table which explains each
> column of the system view. For example pg_locks:
> https://www.postgresql.org/docs/devel/view-pg-locks.html

I was reading the patch, and using int[] as a representation of the
path of context IDs up to the top-most parent looks a bit strange to
me, with the relationship between each parent -> child being
preserved, visibly, based on the order of the elements in this array
made of temporary IDs compiled on-the-fly during the function
execution.  Am I the only one finding that a bit strange?  Could it be
better to use a different data type for this path and perhaps switch
to the names of the contexts involved?

It is possible to retrieve this information some WITH RECURSIVE as
well, as mentioned upthread.  Perhaps we could consider documenting
these tricks?
--
Michael

Вложения

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: DSA_ALLOC_NO_OOM doesn't work
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: About a recently-added message