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

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [PATCH] Allow Postgres to pick an unused port to listen
Дата
Msg-id CA+Tgmob5BHPRhCZuZupKeacxMnvxHnuHAPXcA8XNj2KiPFDsKQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Allow Postgres to pick an unused port to listen  (Greg Stark <stark@mit.edu>)
Ответы Re: [PATCH] Allow Postgres to pick an unused port to listen  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Apr 12, 2023 at 1:31 PM Greg Stark <stark@mit.edu> wrote:
> I don't object to using the pid file as the mechanism -- but it is a
> bit of an awkward UI for shell scripting. I imagine it would be handy
> if pg_ctl had an option to just print the port number so you could get
> it with a simple port=`pg_ctl -D <dir> status-port`

That's not a bad idea, and would provide some additional isolation to
reduce direct dependency on the PID file format.

However, awk 'NR==4' $PGDATA/postmaster.pid is hardly insanity. If it
can be done with a 5-character awk script, it's not too hard. The kind
of thing you're talking about is much more important with things like
pg_control or postgresql.conf that have much more complicated formats.
The format of the PID file is intentionally simple. But that's not to
say that I'm objecting.

--
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: [PATCH] Allow Postgres to pick an unused port to listen
Следующее
От: Dagfinn Ilmari Mannsåker
Дата:
Сообщение: Re: Tab completion for AT TIME ZONE