Re: Creating a function for exposing memory usage of backend process

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Creating a function for exposing memory usage of backend process
Дата
Msg-id 20200819135545.GC19121@paquier.xyz
обсуждение исходный текст
Ответ на Re: Creating a function for exposing memory usage of backend process  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Ответы Re: Creating a function for exposing memory usage of backend process  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Aug 19, 2020 at 06:12:02PM +0900, Fujii Masao wrote:
> On 2020/08/19 17:40, torikoshia wrote:
>> Yes, I didn't add regression tests because of the unstability of the output.
>> I thought it would be OK since other views like pg_stat_slru and pg_shmem_allocations
>> didn't have tests for their outputs.
>
> You're right.

If you can make a test with something minimal and with a stable
output, adding a test is helpful IMO, or how can you make easily sure
that this does not get broken, particularly in the event of future
refactorings, or even with platform-dependent behaviors?

By the way, I was looking at the code that has been committed, and I
think that it is awkward to have a SQL function in mcxt.c, which is a
rather low-level interface.  I think that this new code should be
moved to its own file, one suggestion for a location I have being
src/backend/utils/adt/mcxtfuncs.c.
--
Michael

Вложения

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: prepared transaction isolation tests
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?