Re: Re: [PATCHES] PostgreSQL virtual hosting support - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Re: [PATCHES] PostgreSQL virtual hosting support
Date
Msg-id 15243.974160702@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: [PATCHES] PostgreSQL virtual hosting support  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Re: [PATCHES] PostgreSQL virtual hosting support
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> What happened to the concerns that were raised?  The socket file is a lock
> file, you cannot just move it around.

Good point.  IIRC, we rely on the socket file lock to ensure that you
can't start two postmasters with the same port number.  (If both are
started with -i, then you'll get a conflict on the IP port address,
but if one or both is started without, then the socket-file lock is
the only line of defense.)  This is important because shared memory
keys are derived from the port number.  I'm not sure that the code
will behave in a pleasant manner when two postmasters try to use the
same shared memory block --- most likely, death and destruction will
ensue.

I think we had some discussions about changing the way that shared
memory keys are generated, which might make this a less critical issue.
But until something's done about that, this patch looks awfully
dangerous.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: [PATCHES] PostgreSQL virtual hosting support
Next
From: Mark Hollomon
Date:
Subject: Re: CREATE MODULE (was: Coping with 'C' vs 'newC' function language names)