Re: two servers on the same port - Mailing list pgsql-hackers

From Tom Lane
Subject Re: two servers on the same port
Date
Msg-id 11068.1224468922@sss.pgh.pa.us
Whole thread Raw
In response to Re: two servers on the same port  (Eric Haszlakiewicz <erh@swapsimple.com>)
Responses Re: two servers on the same port
List pgsql-hackers
Eric Haszlakiewicz <erh@swapsimple.com> writes:
> On Sat, Oct 18, 2008 at 12:48:13PM -0400, Tom Lane wrote:
>> That's already documented not to work, and not for any hidden
>> implementation reason: you'd have a conflict on the Unix-domain socket
>> name.

> er.. but I didn't get any kind of error about a conflict on a unix domain
> socket, I got an error about shmget.  I don't even think it's possible
> to have a conflict like that since the two servers were running in 
> different chroot directories.

Well, different chroot would do it, but you didn't mention that ;-)

Anyway, I still think that the proposed documentation patches are wrong,
because the code ought to work as long as you don't have a direct
conflict on TCP or Unix sockets.  It's true that the port number is used
as a seed for picking shmem keys, but it should try the next key if it
hits an already-in-use shmem segment.  Can you poke at it a bit more
closely and see what's happening?  What platform is this, anyway?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Eric Haszlakiewicz
Date:
Subject: Re: two servers on the same port
Next
From: Eric Haszlakiewicz
Date:
Subject: Re: two servers on the same port