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

Поиск
Список
Период
Сортировка
От Yurii Rashkovskii
Тема [PATCH] Allow Postgres to pick an unused port to listen
Дата
Msg-id CA+RLCQwJBGAnBo7OZ6QxqJjEn6w=Mju9GrHQmwFxX_io+4Cwhw@mail.gmail.com
обсуждение исходный текст
Ответы Re: [PATCH] Allow Postgres to pick an unused port to listen  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

I would like to suggest a patch against master (although it may be worth backporting it) that makes it possible to listen on any unused port.

The main motivation is running colocated instances of Postgres (such as test benches) without having to coordinate port allocation in an unnecessarily complicated way.

Instead, with this patch, one can specify `port` as `0` (the "wildcard" port) and retrieve the assigned port from postmaster.pid

I believe there is no significant performance or another impact as it is a tiny bit of conditional functionality executed during startup.

The patch builds and `make check` succeeds. The patch does not add a test; however, I am trying to figure out if this behaviour can be tested automatically.
Вложения

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

Предыдущее
От: Yugo NAGATA
Дата:
Сообщение: Using Ephemeral Named Relation like a temporary table
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Using Ephemeral Named Relation like a temporary table