Document that server will start even if it's unable to open some TCP/IP ports
Gurjeet Singh <gurjeet@singh.im>
From: Gurjeet Singh <gurjeet@singh.im>
To: Postgres Hackers <pgsql-hackers@postgresql.org>
Date: 2023-05-27T22:17:21Z
Lists: pgsql-hackers
Attachments
- v1-0001-Document-that-the-server-starts-only-if-at-least-.patch (application/octet-stream) patch v1-0001
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