From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: AIO v2.2 |
Date: | 2025-01-07 19:59:58 |
Message-ID: | CA+TgmoaZT6tkZL-prS1_5m10G+1CvG9b7NknJ6yvbKnhBD8msQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jan 7, 2025 at 11:11 AM Andres Freund <andres(at)anarazel(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2025-01-07 20:09:56 | Re: AIO v2.2 |
Previous Message | Daniel Gustafsson | 2025-01-07 19:56:16 | Re: Coccinelle for PostgreSQL development [2/N]: autoconf support [RESEND] |