Search Postgresql Archives

Re: Connect to specific cluster on command line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux