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

From Nathan Bossart
Subject Re: Document that server will start even if it's unable to open some TCP/IP ports
Date
Msg-id 20230613213814.GB219055@nathanxps13
Whole thread Raw
In response to Re: Document that server will start even if it's unable to open some TCP/IP ports  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Document that server will start even if it's unable to open some TCP/IP ports
List pgsql-hackers
On Tue, Jun 13, 2023 at 04:28:31PM -0400, Tom Lane wrote:
> Nathan Bossart <nathandbossart@gmail.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



pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Fix a typo in md.c
Next
From: Michael Paquier
Date:
Subject: Re: Support logical replication of DDLs