]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix shared memory calculation size of PgAioCtl
authorMichael Paquier <michael@paquier.xyz>
Wed, 17 Sep 2025 00:33:35 +0000 (09:33 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 17 Sep 2025 00:33:35 +0000 (09:33 +0900)
commitdd74e599b8f639fbccc3655d3856a56a6b8d4288
tree9020f901612a49200aa1e977f7010358bb100eed
parent78e6047dcea588ec127f6a71c7cebd5c0f41d795
Fix shared memory calculation size of PgAioCtl

The shared memory size was calculated based on an offset of io_handles,
which is itself a pointer included in the structure.  We tend to
overestimate the shared memory size overall, so this was unlikely an
issue in practice, but let's be correct and use the full size of the
structure in the calculation, so as the pointer for io_handles is
included.

Oversight in da7226993fd4.

Author: Madhukar Prasad <madhukarprasad@google.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Matthias van de Meent <boekewurm+postgres@gmail.com>
Discussion: https://postgr.es/m/CAKi+wrbC2dTzh_vKJoAZXV5wqTbhY0n4wRNpCjJ=e36aoo0kFw@mail.gmail.com
Backpatch-through: 18
src/backend/storage/aio/aio_init.c