Re: abstract Unix-domain sockets

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: abstract Unix-domain sockets
Дата
Msg-id 9fc70922-d2b2-3408-d83a-8212894749cb@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: abstract Unix-domain sockets  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: abstract Unix-domain sockets
Список pgsql-hackers
On 2020-11-12 08:12, Michael Paquier wrote:
> On Wed, Nov 11, 2020 at 01:39:17PM +0100, Peter Eisentraut wrote:
>> Thinking about it further, I think the hint in the Unix-domain socket case
>> is bogus.  A socket in the file-system namespace never reports EADDRINUSE
>> anyway, it just overwrites the file.  For sockets in the abstract namespace,
>> you can get this error, but of course there is no file to remove.
>>
>> Perhaps we should change the hint in both the Unix and the IP cases to:
>>
>> "Is another postmaster already running at this address?"
>> (This also resolves the confusing reference to "port" in the Unix case.)
> Er, it is perfectly possible for two postmasters to use the same unix
> socket path, abstract or not, as long as they listen to different
> ports (all nodes in a single TAP test do that for example).  So we
> should keep a reference to the port used in the log message, no?

"Port" is not a real thing for Unix-domain sockets, it's just something 
we use internally and append to the socket file.  The error message is 
currently something like

ERROR:  could not bind Unix address "/tmp/.s.PGSQL.5432": Address 
already in use
HINT:  Is another postmaster already running on port 5432? If not, 
remove socket file "/tmp/.s.PGSQL.5432" and retry.

So the mention of the "port" doesn't really add any information here and 
just introduces new terminology that isn't really relevant.

My idea is to change the message to:

ERROR:  could not bind Unix address "/tmp/.s.PGSQL.5432": Address 
already in use
HINT:  Is another postmaster already running at this address?

-- 
Peter Eisentraut
2ndQuadrant, an EDB company
https://www.2ndquadrant.com/



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: ERROR: too many dynamic shared memory segment
Следующее
От: Jacob Champion
Дата:
Сообщение: Re: Zedstore - compressed in-core columnar storage