Re: Add memory context type to pg_backend_memory_contexts view

Поиск
Список
Период
Сортировка
От David Christensen
Тема Re: Add memory context type to pg_backend_memory_contexts view
Дата
Msg-id CAHM0NXiteCqc+W5d7rD4F83z10CGPEZb6Gtny5AFCsh=Yp-3oA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add memory context type to pg_backend_memory_contexts view  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: Add memory context type to pg_backend_memory_contexts view
Список pgsql-hackers
Hi David,

Giving this a once-through, this seems straightforward and useful.  I
have a slight preference for keeping "name" the first field in the
view and moving "type" to the second, but that's minor.

Just confirming that the allocator types are not extensible without a
recompile, since it's using a specific node tag to switch on, so there
are no concerns with not properly displaying the output of something
else.

The "????" text placeholder might be more appropriate as "<unknown>",
or perhaps stronger, include a WARNING in the logs, since an unknown
tag at this point would be an indication of some sort of memory
corruption.

Since there are only four possible values, I think there would be
utility in including them in the docs for this field.  I also think it
would be useful to have some sort of comments at least in mmgr/README
to indicate that if a new type of allocator is introduced that you
will also need to add the node to the function for this type, since
it's not an automatic conversion. (For that matter, instead of
switching on node type and outputting a given string, is there a
generic function that could just give us the string value for node
type so we don't need to teach anything else about it anyway?)

Thanks,

David



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

Предыдущее
От: Andrei Zubkov
Дата:
Сообщение: Re: Vacuum statistics
Следующее
От: Tomasz Rybak
Дата:
Сообщение: Re: Should consider materializing the cheapest inner path in consider_parallel_nestloop()