Re: Starting a PostgreSQL server on a dynamic port (parameter port=0) - Mailing list pgsql-bugs

From Jim Jones
Subject Re: Starting a PostgreSQL server on a dynamic port (parameter port=0)
Date
Msg-id ac7e4a4a-28ef-4a69-8f20-5bf2e7385c85@uni-muenster.de
Whole thread Raw
In response to Re: Starting a PostgreSQL server on a dynamic port (parameter port=0)  (Laurenz Albe <laurenz.albe@cybertec.at>)
List pgsql-bugs

On 10.07.25 10:53, Laurenz Albe wrote:
> I have never wished for such a feature, and I can see negative side
> effects.  If the server listens on a different port than you expect,
> it is easier to connect to the wrong server by mistake.

Moreover, there's a risk that postgres could potentially hijack the port
of an application that's not currently running, but has a fixed port
configuration assigned to it. This could, in turn, prevent the
application from starting up successfully.

I can understand why it might be attractive for some scenarios, but the
risks and consequences could outweigh the benefits.

Best, Jim



pgsql-bugs by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Starting a PostgreSQL server on a dynamic port (parameter port=0)
Next
From: Fujii Masao
Date:
Subject: Re: Unexpected behavior when setting "idle_replication_slot_timeout"