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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [PATCH] Allow Postgres to pick an unused port to listen
Дата
Msg-id 20230511083630.ace2m5t43fefizhv@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: [PATCH] Allow Postgres to pick an unused port to listen  (Yurii Rashkovskii <yrashk@gmail.com>)
Ответы Re: [PATCH] Allow Postgres to pick an unused port to listen  (Yurii Rashkovskii <yrashk@gmail.com>)
Список pgsql-hackers
On 2023-May-11, Yurii Rashkovskii wrote:

> Relying on a variable number of lines may be counter-productive here if we
> want postmaster.pid to be easily readable by shell scripts.

Oh, I was thinking in Peter E's proposal to list the interface/port
number pairs in a separate file named 'ports' or something like that.

> ```
> 127.0.0.1=5432 ::1=54321
> ```
> 
> Basically, a space-delimited set of address/port pairs (delimited by `=` to
> allow IPv6 addresses to use a colon).

This seems a bit too creative.  I'd rather have the IPv6 address in
square brackets, which clues the parser immediately as to the address
family and use colons to separate the port number.  If we do go with a
separate file, which to me sounds easier than cramming it into the PID
file, then one per line is likely better, if only because line-oriented
Unix text tooling has an easier time that way.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"Having your biases confirmed independently is how scientific progress is
made, and hence made our great society what it is today" (Mary Gardiner)



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

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: pg_upgrade - typo in verbose log
Следующее
От: "Hayato Kuroda (Fujitsu)"
Дата:
Сообщение: RE: [PoC] pg_upgrade: allow to upgrade publisher node