On Wed, Jun 27, 2012 at 9:52 AM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> What this all boils down to is- can you have a shm segment that goes
> away when no one is still attached to it, but actually give it a name
> and then detect if it already exists atomically on startup on
> Linux/Unixes? If so, perhaps we could use the same mechanism on both..
As I understand it, no. You can either have anonymous shared
mappings, which go away when no longer in use but do not have a name.
Or you can have POSIX or sysv shm, which have a name but do not
automatically go away when no longer in use. There seems to be no
method for setting up a segment that both has a name and goes away
automatically. POSIX shm in particular tries to "look like a file",
whereas anonymous memory tries to look more like malloc (except that
you can share the mapping with child processes).
The Enterprise PostgreSQL Company
In response to
pgsql-hackers by date
|Next:||From: Heikki Linnakangas||Date: 2012-06-27 14:56:13|
|Subject: Re: Regarding WAL Format Changes|
|Previous:||From: Tom Lane||Date: 2012-06-27 14:27:31|
|Subject: Re: Reporting hba lines|