diff options
-rw-r--r-- | src/backend/utils/activity/pgstat_io.c | 8 | ||||
-rw-r--r-- | src/include/pgstat.h | 4 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/backend/utils/activity/pgstat_io.c b/src/backend/utils/activity/pgstat_io.c index e03b021af3d..027aad8b24e 100644 --- a/src/backend/utils/activity/pgstat_io.c +++ b/src/backend/utils/activity/pgstat_io.c @@ -24,14 +24,6 @@ static PgStat_PendingIO PendingIOStats; static bool have_iostats = false; /* - * Check if an IOOp is tracked in bytes. This relies on the ordering of IOOp - * defined in pgstat.h, so make sure to update this check when changing its - * elements. - */ -#define pgstat_is_ioop_tracked_in_bytes(io_op) \ - ((io_op) < IOOP_NUM_TYPES && (io_op) >= IOOP_EXTEND) - -/* * Check that stats have not been counted for any combination of IOObject, * IOContext, and IOOp which are not tracked for the passed-in BackendType. If * stats are tracked for this combination and IO times are non-zero, counts diff --git a/src/include/pgstat.h b/src/include/pgstat.h index a878402f502..2d40fe3e70f 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -314,6 +314,10 @@ typedef enum IOOp #define IOOP_NUM_TYPES (IOOP_WRITE + 1) +#define pgstat_is_ioop_tracked_in_bytes(io_op) \ + (((unsigned int) (io_op)) < IOOP_NUM_TYPES && \ + ((unsigned int) (io_op)) >= IOOP_EXTEND) + typedef struct PgStat_BktypeIO { uint64 bytes[IOOBJECT_NUM_TYPES][IOCONTEXT_NUM_TYPES][IOOP_NUM_TYPES]; |