Of course, unfortunately it is more complicated than the original as it uses both sets of API. Also, I haven't tested the crash recovery thoroughly. The POSIX code could be used Windows-style (i.e. no crash recovery) if one ifdef'd out the SysV calls properly, if they had such a POSIX-only platform they needed to run Postgres on.
Using both API is certainly not ideal. You mentioned,
We've speculated on occasion about using file locking in some form as asubstitute mechanism for detecting this, but that seems to just bring its own set of not-too-portable assumptions
What sort of file locking did you have in mind? Do you think this might be worth me trying?
Thanks for your help, Chris Marcellino
posix_shmem.c
Description: Binary data
---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings