Re: abstract Unix-domain sockets

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: abstract Unix-domain sockets
Дата
Msg-id bfcf56d5-58b1-ef4a-6a27-6c9d4cbfc103@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: abstract Unix-domain sockets  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: abstract Unix-domain sockets
Список pgsql-hackers
On 2020-11-10 07:24, Michael Paquier wrote:
>> Can you sketch how you would structure this?  I realize it's not very
>> elegant, but I couldn't come up with a better way that didn't involve having
>> to duplicate some of the error messages into multiple branches.
> 
> I think that I would use a StringInfo to build each sentence of the
> hint separately.  The first sentence, "Is another postmaster already
> running on port %d?" is already known.  Then the second sentence could
> be built depending on the two other conditions.

I'm not sure concatenating sentences like that is okay for translatability.

> FWIW, I think that it
> is confusing to mention in the hint to remove a socket file that
> cannot be removed.

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.)

Or we just drop the hint in the Unix case.  The primary error message is 
clear enough.

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



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

Предыдущее
От: Georgios Kokolatos
Дата:
Сообщение: Re: Supporting = operator in gin/gist_trgm_ops
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Clean up optional rules in grammar