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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, nathandbossart(at)gmail(dot)com, gurjeet(at)singh(dot)im, 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-20 00:48:00
Message-ID: ZJD3QDw3bHuCrgpU@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 13, 2023 at 11:11:04PM -0400, Tom Lane wrote:
> Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> writes:
> > 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).
>
> There is certainly an argument that such a condition indicates that
> something's very broken in our configuration and we should complain.
> But I'm not sure how exciting the case is in practice. The systemd
> guys would really like us to be willing to come up before any network
> interfaces are up, and then auto-listen to those interfaces when they
> do come up. On the other hand, the situation with Unix sockets is
> much more static: if you can't make a socket in /tmp or /var/run at
> the instant of postmaster start, it's unlikely you will be able to do
> so later.
>
> Maybe we need different rules for TCP versus Unix-domain sockets?
> I'm not sure what exactly, but lumping those cases together for
> a discussion like this feels wrong.

If we are going to retry for network configuration changes, it seems we
would also retry Unix domain sockets for cases like when the permissions
are wrong, and then fixed.

However, it seem hard to figure out exactly what _is_ working if we take
the approach of dynamically retrying listen methods. Do we report
anything helpful in the server logs when we start and can't listen on
anything?

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-06-20 01:49:03 Re: [BUG] recovery of prepared transactions during promotion can fail
Previous Message Bruce Momjian 2023-06-20 00:42:45 Re: Partial aggregates pushdown