Search Postgresql Archives

Connect to specific cluster on command line

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

 



Hi there,

how can I connect to a specific cluster on the command line, e. g. with psql, pg_dump or pg_dumpall?

pg_lsclusters returns a list of all clusters available:

Ver Cluster Port [...]
14  main    5432 ...
14  test    5433  ...

I want to connect to or dump database xyz in the test cluster. Is it sufficient to specify the cluster's port only?

Perl script pg_backupcluster calls psql and pg_dump with a --cluster option:

pg_dump --cluster 14/test ...

However, this option is not documented (at least I didn't find anything) and also I didn't find anything in the sources on GitHub.

Actually, I only have the 14/main instance and cannot really test accessing the `test` cluster. However, psql and pg_dump actually work with --cluster 14/main and report an error when I specify 14/test so, the option --cluster seems to work. Is it intentionally not documented?

So, whats the recommended way to connect to a specific cluster? Is it just the port?

Regards, Carsten






[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