Re: Make pg_stat_io view count IOs as bytes instead of blocks - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Make pg_stat_io view count IOs as bytes instead of blocks
Date
Msg-id 1547360.1737004718@sss.pgh.pa.us
Whole thread Raw
In response to Re: Make pg_stat_io view count IOs as bytes instead of blocks  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
List 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 by date:

Previous
From: jian he
Date:
Subject: Re: Non-text mode for pg_dumpall
Next
From: Tom Lane
Date:
Subject: Re: Make pg_stat_io view count IOs as bytes instead of blocks