Re: Feature: POSIX Shared memory support - Mailing list pgsql-patches

From Chris Marcellino
Subject Re: Feature: POSIX Shared memory support
Date
Msg-id 12C1D0E7-0206-4EEE-974F-DC5BD06962C2@levelview.com
Whole thread Raw
In response to Re: Feature: POSIX Shared memory support  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Attached is a beta of the POSIX shared memory layer. It is 75% the
original sysv_shmem.c code. I'm looking for ways to refactor it down
a bit, while changing as little of the tried-and-tested code as
possible. I though I'd put it out there for comments.

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 a
> substitute 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



Attachment

pgsql-patches by date:

Previous
From: Chris Marcellino
Date:
Subject: Re: Feature: POSIX Shared memory support
Next
From: "Andrew Dunstan"
Date:
Subject: Re: Feature: POSIX Shared memory support