From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Takayuki Tsunakawa <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>, pgsql-patches(at)postgresql(dot)org, Chris Marcellino <maps(at)levelview(dot)com> |
Subject: | Re: Feature: POSIX Shared memory support |
Date: | 2007-02-08 21:09:42 |
Message-ID: | 45CB9196.9060805@hagander.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Tom Lane wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>> Tom Lane wrote:
>>> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>>>> If we just didn't add the serial number at the end, then it would be
>>>> impossible to create a shared memory segment for the same port again.
>>>> That protects the port and not the datadir. But what if we change the
>>>> name of the shared memory segment to be that of the data directory
>>>> instead of the port?
>>> That would help if there's only one possible spelling of the data
>>> directory path ... otherwise not so much ...
>
>> Well, we could run GetFullPathName() on it
>> (http://msdn2.microsoft.com/en-us/library/aa364963.aspx). I think that
>> should work - takes out the "relative vs absolute path" part at least.
>
>> It won't take care of somebody having a junction pointing at the data
>> directory and starting it against that one, but that's really someone
>> *trying* to break the system. You wouldn't do that by mistake...
>
>> Seems worthwhile to you? If so I can take a look at doing it when I get
>> some spare time.
>
> Sounds reasonable --- certainly it'd be better than the current
> situation. I assume that we can have long enough shared memory segment
> names that the data directory path length isn't unduly constrained?
From what I can see, we can have a shared memory segment name that is
just as long as any path name. Will run some tests on that to make
absolutely sure.
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-02-08 21:10:25 | Re: [PATCHES] [pgsql-patches] Phantom Command IDs, updated patch |
Previous Message | Tom Lane | 2007-02-08 21:08:36 | Re: Feature: POSIX Shared memory support |