Hi ChangAo,
Thanks for the review!
I've attached v2, which adds a shmem_cleanup callback to
IoMethodOps, registered in AioShmemInit().
Like you, I don't know which approach I prefer since the
new callback currently has only one implementor. If no
other IO method is expected to need cleanup, the simpler
v1 approach may be preferable. Happy to hear your thoughts.
I've also added this patch to the commitfest app:
https://commitfest.postgresql.org/patch/6617/
Regards,
Lucas.