Re: Connect to specific cluster on command line

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Connect to specific cluster on command line
Дата
Msg-id 8707ad0b877ae6245576452347c2efce327a4759.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Connect to specific cluster on command line  (Carsten Klein <c.klein@datagis.com>)
Список pgsql-general
On Wed, 2022-05-25 at 16:48 +0200, Carsten Klein wrote:
> So, forget about the packager. With core PostgreSQL tools it is possible 
> to have more than one cluster. How do you specify what cluster to 
> connect to with psql or pg_dump? Do I have to specify the cluster's 
> corresponding Unix domain socket directory via the --host option?

With -h you specify the directory containing the socket, and
with -p (port) the name.

So you could

  psql -h /var/run/postgresql -p 5555

to use the socket /var/run/postgresql/.s.PGSQL.5555

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com



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

Предыдущее
От: Andreas Fröde
Дата:
Сообщение: Re: Connect to specific cluster on command line
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Connect to specific cluster on command line