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

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: Document that server will start even if it's unable to open some TCP/IP ports
Дата
Msg-id 20230614.115635.2291203033279171356.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Re: Document that server will start even if it's unable to open some TCP/IP ports  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: Document that server will start even if it's unable to open some TCP/IP ports  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
At Tue, 13 Jun 2023 14:38:14 -0700, Nathan Bossart <nathandbossart@gmail.com> wrote in 
> 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.

If I had to say, I would feel it rather surprising if server
successfully starts even when any explicitly-specified port can't be
opened (which is the current case). The current auto-adaption is fine
iff I use '*' for listen_addresses.  IMHO, for "reliable"
auto-adaption, we might want '[+-]?xxx.xxx.xxx.xxx/nn' (and the same
for v6), or '[+-]?interface-name' notation to require, allow, or
disallow to use specific networks.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



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

Предыдущее
От: YANG Xudong
Дата:
Сообщение: Re: [PATCH] Add loongarch native checksum implementation.
Следующее
От: Amit Langote
Дата:
Сообщение: Re: Views no longer in rangeTabls?