Re: Make pg_stat_io view count IOs as bytes instead of blocks

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Make pg_stat_io view count IOs as bytes instead of blocks
Дата
Msg-id 1547360.1737004718@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Make pg_stat_io view count IOs as bytes instead of blocks  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Список pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> Just for an assert, I would just remove the macro rather than have an
> inline function.

Oh, I'd not noticed that there is only one caller.

However, the macro does provide a convenient place to hang the
warning comment about keeping it sync'd with the enum.
Personally I'd keep the macro but move it to pgstat.h, close
to the enum declaration, so that there's more than epsilon
chance of someone who's changing the enum noticing they need
to update it.

            regards, tom lane



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