Re: abstract Unix-domain sockets

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: abstract Unix-domain sockets
Дата
Msg-id CAKFQuwYwYjno=JYLYexiZkf8mJvDUi=gfNt+DDiumninH+wKFw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: abstract Unix-domain sockets  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: abstract Unix-domain sockets
Список 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 по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Refactor pg_rewind code and make it work against a standby
Следующее
От: Matthias van de Meent
Дата:
Сообщение: [patch] CLUSTER blocks scanned progress reporting