summaryrefslogtreecommitdiff
path: root/src/backend/storage/aio/aio_callback.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/aio/aio_callback.c')
-rw-r--r--src/backend/storage/aio/aio_callback.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/storage/aio/aio_callback.c b/src/backend/storage/aio/aio_callback.c
index 53db6e194af..b00b6bc1025 100644
--- a/src/backend/storage/aio/aio_callback.c
+++ b/src/backend/storage/aio/aio_callback.c
@@ -83,6 +83,7 @@ pgaio_io_register_callbacks(PgAioHandle *ioh, PgAioHandleCallbackID cb_id,
{
const PgAioHandleCallbacksEntry *ce = &aio_handle_cbs[cb_id];
+ Assert(cb_id <= PGAIO_HCB_MAX);
if (cb_id >= lengthof(aio_handle_cbs))
elog(ERROR, "callback %d is out of range", cb_id);
if (aio_handle_cbs[cb_id].cb->complete_shared == NULL &&