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

From David G. Johnston
Subject Re: abstract Unix-domain sockets
Date
Msg-id CAKFQuwYwYjno=JYLYexiZkf8mJvDUi=gfNt+DDiumninH+wKFw@mail.gmail.com
Whole thread Raw
In response to Re: abstract Unix-domain sockets  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: abstract Unix-domain sockets  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On Friday, November 20, 2020, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
On 2020-11-18 04:35, David G. Johnston wrote:


I agree that there isn't a useful hint for the abstract case as it shouldn't happen unless there is indeed another running instance with the same configuration.  Though a hint similar to the above, but without the "remove and retry" bit, probably wouldn't hurt.

I think we are getting a bit sidetracked here with the message wording. The reason I looked at this was that "remove socket file and retry" is never an appropriate action with abstract sockets.  And on further analysis, it is never an appropriate action with any Unix-domain socket (because with file system namespace sockets, you never get an EADDRINUSE, so it's dead code).  So my proposal here is to just delete that line from the hint and leave the rest the same.  There could be value in further refining and rephrasing this, but it ought to be a separate thread.

If there is dead code there is an underlying problem to address/discover, not just removing the dead code.  In this case are we saying that a new server won’t ever fail to start because the socket file exists but instead will just clobber the file with its own?  Because given that error, and a server process that failed to clean up after itself, the correction to take would indeed seem to be to manually remove the file as the hint says.  IOW, fix the code, not the message?

David J.

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Refactor pg_rewind code and make it work against a standby
Next
From: Matthias van de Meent
Date:
Subject: [patch] CLUSTER blocks scanned progress reporting