Re: [PATCH] Allow Postgres to pick an unused port to listen

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Yurii Rashkovskii <yrashk(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Allow Postgres to pick an unused port to listen
Date: 2023-04-24 14:16:03
Message-ID: e2e5a119-c68e-5e4a-16e0-7a7e2c515741@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 19.04.23 06:21, Stephen Frost wrote:
>> I don't think involving pg_ctl is necessary or desirable, since it would
>> make any future changes like that even more complicated.
> I'm a bit confused by this- if pg_ctl is invoked then we have
> more-or-less full control over parsing and reporting out the answer, so
> while it might be a bit more complicated for us, it seems surely simpler
> for the end user. Or maybe you're referring to something here that I'm
> not thinking of?

Getting pg_ctl involved just requires a lot more work. We need to write
actual code, documentation, tests, help output, translations, etc. If
we ever change anything, then we need to transition the command-line
arguments somehow, add more documentation, etc.

A file is a much simpler interface: You just write to it, write two
sentences of documentation, that's all.

Or to put it another way, if we don't think a file is an appropriate
interface, then why is a PID file appropriate?

> Independent of the above though ... this hand-wringing about what we
> might do in the relative near-term when we haven't done much in the past
> many-many years regarding listen_addresses or port strikes me as
> unlikely to be necessary. Let's pick something and get it done and
> accept that we may have to change it at some point in the future, but
> that's kinda what major releases are for, imv anyway.

Right. I'm perfectly content with just allowing port number 0 and
leaving it at that.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2023-04-24 14:22:56 Re: [PoC] pg_upgrade: allow to upgrade publisher node
Previous Message Andrew Dunstan 2023-04-24 14:14:34 Re: Add missing copyright for pg_upgrade/t/* files