Re: AIO v2.2 - Mailing list pgsql-hackers

From Robert Haas
Subject Re: AIO v2.2
Date
Msg-id CA+TgmoaZT6tkZL-prS1_5m10G+1CvG9b7NknJ6yvbKnhBD8msQ@mail.gmail.com
Whole thread Raw
In response to Re: AIO v2.2  (Andres Freund <andres@anarazel.de>)
Responses Re: AIO v2.2
List pgsql-hackers
On Tue, Jan 7, 2025 at 11:11 AM Andres Freund <andres@anarazel.de> wrote:
> The difference between a handle and a reference is useful right now, to have
> some separation between the functions that can be called by anyone (taking a
> PgAioHandleRef) and only by the issuer (PgAioHandle). That might better be
> solved by having a PgAioHandleIssuerRef ref or something.

To me, those names don't convey that. I would perhaps call the thing
that supports issuer-only operations a "PgAio" and the thing other
people can use a "PgAioHandle". Or "PgAioRequest" and "PgAioHandle" or
something like that. With PgAioHandleRef, IMHO you've got two words
that both imply a layer of indirection -- "handle" and "ref" -- which
doesn't seem quite as nice, because then the other thing --
"PgAioHandle" still sort of implies
one layer of indirection and the whole thing seems a bit less clear.

(I say all of this having looked at nothing, so feel free to ignore me
if that doesn't sound coherent.)

> > REAPED feels like a bad name. It sounds like a later stage than COMPLETED,
> > but it's actually vice versa.
>
> What would you call having gotten "completion notifications" from the kernel,
> but not having processed them?

The Linux kernel calls those zombie processes, so we could call it a
ZOMBIE state, but that seems like it might be a bit of inside
baseball. I do agree with Heikki that REAPED sounds later than
COMPLETED, because you reap zombie processes by collecting their exit
status. Maybe you could have AHS_COMPLETE or AHS_IO_COMPLETE for the
state where the I/O is done but there's still completion-related work
to be done, and then the other state could be AHS_DONE or AHS_FINISHED
or AHS_FINAL or AHS_REAPED or something.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Coccinelle for PostgreSQL development [2/N]: autoconf support [RESEND]
Next
From: Jeff Davis
Date:
Subject: Re: Statistics Import and Export