Re: abstract Unix-domain sockets - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: abstract Unix-domain sockets
Date
Msg-id 9fc70922-d2b2-3408-d83a-8212894749cb@2ndquadrant.com
Whole thread Raw
In response to Re: abstract Unix-domain sockets  (Michael Paquier <michael@paquier.xyz>)
Responses Re: abstract Unix-domain sockets  (Michael Paquier <michael@paquier.xyz>)
List 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 by date:

Previous
From: Thomas Munro
Date:
Subject: Re: ERROR: too many dynamic shared memory segment
Next
From: Jacob Champion
Date:
Subject: Re: Zedstore - compressed in-core columnar storage