Re: AioCtl Shared Memory size fix
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: "Madhukar ." <madhukarprasad@google.com>, pgsql-hackers@postgresql.org, Vaibhav Jain <jainva@google.com>, Sangeetha Seshadri <sangsesh@google.com>, Noah Misch <nmisch@google.com>
Date: 2025-09-16T06:50:20Z
Lists: pgsql-hackers
On Mon, Sep 15, 2025 at 02:06:03PM +0200, Matthias van de Meent wrote: > Presumably this was `PgAioHandle io_handles[]` at some point, but now > that it's a pointer it's a proper part of the struct's own size, and > should be treated as such for memory accounting. I would bet on a FLEXIBLE_ARRAY_MEMBER from a previous version.. >> Please find a patch to account for io_handles member of PgAioCtl. >> The patch uses sizeof(PgAioCtl) instead of offsetof(PgAioCtl, io_handles) in AioCtlShmemSize. > > LGTM. Yep, will fix. Thanks for the report, the patch and the review, to both of you. -- Michael
Commits
-
Fix shared memory calculation size of PgAioCtl
- dd74e599b8f6 18.0 landed
- 158c48303e8a 19 (unreleased) landed