Re: Document that server will start even if it's unable to open some TCP/IP ports

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gurjeet Singh <gurjeet(at)singh(dot)im>, Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Document that server will start even if it's unable to open some TCP/IP ports
Date: 2023-06-13 21:38:14
Message-ID: 20230613213814.GB219055@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 13, 2023 at 04:28:31PM -0400, Tom Lane wrote:
> Nathan Bossart <nathandbossart(at)gmail(dot)com> writes:
>> Before we spend too much time trying to document the current behavior, I
>> think we should see if we can change it to something less surprising (i.e.,
>> failing to start if the server fails for any address). The original
>> objections around kernel support for IPv6 might no longer stand.
>
> I think that'd be more surprising not less.

The reason it surprises me is because it creates uncertainty about the
server configuration. Granted, I could look in the logs for any warnings,
but I'm not sure that's the best experience. I would expect this to work
more like huge_pages. If I set huge_pages to "on", I know that the server
is using huge pages if it starts up.

> The systemd guys certainly believe that daemons ought to auto-adapt
> to changes in the machine's internet connectivity. We aren't there
> yet, but I can imagine somebody trying to fix that someday soon.
> If the postmaster is able to dynamically acquire and drop ports then
> it would certainly not make sense to behave as you suggest.

Agreed, if listen_addresses became a PGC_SIGHUP parameter, it would make
sense to avoid shutting down the server if it was dynamically
misconfigured, as is done for the configuration files. I think that
argument applies for changes in connectivity, too.

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-06-13 21:56:42 Re: Support logical replication of DDLs
Previous Message Masahiko Sawada 2023-06-13 21:33:18 Fix a typo in md.c