Document that server will start even if it's unable to open some TCP/IP ports - Mailing list pgsql-hackers

From Gurjeet Singh
Subject Document that server will start even if it's unable to open some TCP/IP ports
Date
Msg-id CABwTF4WYPD9ov-kcSq1+J+ZJ5wYDQLXquY6Lu2cvb-Y7pTpSGA@mail.gmail.com
Whole thread Raw
Responses Re: Document that server will start even if it's unable to open some TCP/IP ports
List pgsql-hackers
The attached patch clarifies that the server will start even if it is
unable to open the port on some of the TCP/IP addresses listed (or
implied by a value of '*' or localhost) in listen_addresses parameter.

I think it is important to call this out, because I was surprised to
see that the server started even though the port was occupied by
another process. Upon close inspection, I noticed that the other
process was using that port on 127.0.0.1, so Postgres complained about
that interface (a warning in server log), but it was able to open the
port on IPv6 ::1, so it started up as normal.

Upon further testing, I saw that server will not start only if it is
unable to open the port on _all_ the interfaces/addresses. It it's
able to open the port on at least one, the server will start.

If listen_addresses is empty, then server won't try to open any TCP/IP
ports. The patch does not change any language related to that.

Best regards,
Gurjeet
http://Gurje.et

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: testing dist tarballs
Next
From: MARK CALLAGHAN
Date:
Subject: Re: benchmark results comparing versions 15.2 and 16