Re: [PATCH] Allow Postgres to pick an unused port to listen - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [PATCH] Allow Postgres to pick an unused port to listen
Date
Msg-id ZDcnXE3uyHdMpxB1@paquier.xyz
Whole thread Raw
In response to Re: [PATCH] Allow Postgres to pick an unused port to listen  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Apr 12, 2023 at 02:24:30PM -0400, Tom Lane wrote:
> I don't really want external code knowing that line 4 is the port,
> because I foresee us breaking that someday --- what will happen
> when we want to allow one postmaster to support multiple ports?
> Maybe we'll decide that we don't have to reflect that in the
> pidfile, but let's not constrain our decisions ahead of time.

In the same fashion as something mentioned upthread, the format
portability would not matter much if all the information from the PID
file is wrapped around a pg_ctl command or something equivalent that
controls its output format, say:
pg_ctl -D $PGDATA --format={json,what_you_want} postmaster_file

To be more precise, storage.sgml documents the format of the PID file
in what seems like the correct order for each item, some of them being
empty depending on the setup.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Melanie Plageman
Date:
Subject: Re: Wrong results from Parallel Hash Full Join
Next
From: David Rowley
Date:
Subject: Re: Fix incorrect start up costs for WindowAgg paths (bug #17862)