pgsql: Make error hint from bind() failure more accurate

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема pgsql: Make error hint from bind() failure more accurate
Дата
Msg-id E1khpRQ-0000Uy-JN@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Make error hint from bind() failure more accurate

The hint "Is another postmaster already running ..." should only be
printed for errors that are really about something else already using
the address.  In other cases it is misleading.  So only show that hint
if errno == EADDRINUSE.

Also, since Unix-domain sockets in the file-system namespace never
report EADDRINUSE for an existing file (they would just overwrite it),
the part of the hint saying "If not, remove socket file \"%s\" and
retry." can never happen, so remove it.  Unix-domain sockets in the
abstract namespace can report EADDRINUSE, but in that case there is no
file to remove, so the hint doesn't work there either.

Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://www.postgresql.org/message-id/flat/6dee8574-b0ad-fc49-9c8c-2edc796f0033@2ndquadrant.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d5d91acdccae6b322a5634be2c66d62fc6b9a43d

Modified Files
--------------
src/backend/libpq/pqcomm.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)


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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: pgsql: Fix WaitLatch(NULL) on Windows.
Следующее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: doc: Fix typos