Re: Connect to specific cluster on command line

2022-05-25 Thread Andreas Fröde
On 5/25/22 16:48, 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? psql, pg_dump and friends know the -p (or --port) option. Maybe man psql and man

Re: Connect to specific cluster on command line

2022-05-25 Thread Carsten Klein
On Wed 2022-05-25 at 17:05 David G. Johnston wrote: IIRC they write wrapper scripts they put into the version-agnostic bin directory that deal with the version/cluster-name scheme they’ve setup before calling the core commands located in the version-specific install directory. You are comple

Re: Connect to specific cluster on command line

2022-05-25 Thread Adrian Klaver
On 5/25/22 07:30, Carsten Klein wrote: Hi there, 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.

Re: Connect to specific cluster on command line

2022-05-25 Thread David G. Johnston
On Wednesday, May 25, 2022, Carsten Klein wrote: > > >> pg_lsclusters is not part of core Postgres, and neither is this >> --cluster option you mention. I'm vaguely aware that some packager >> (Debian I think) has added an overlay of that sort; but you'd need >> to consult the package-level docu

Re: Connect to specific cluster on command line

2022-05-25 Thread Tom Lane
Carsten Klein writes: > 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

Re: Connect to specific cluster on command line

2022-05-25 Thread Laurenz Albe
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

Re: Connect to specific cluster on command line

2022-05-25 Thread Carsten Klein
pg_lsclusters is not part of core Postgres, and neither is this --cluster option you mention. I'm vaguely aware that some packager (Debian I think) has added an overlay of that sort; but you'd need to consult the package-level documentation not the community docs in order to find out more.

Re: Connect to specific cluster on command line

2022-05-25 Thread Tom Lane
Carsten Klein writes: > 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: pg_lsclusters is not part of core Postgres, and neither is this --cluster option you mention. I'm vaguely awa

Connect to specific cluster on command line

2022-05-25 Thread Carsten Klein
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 main5432 ... 14 test5433 ... I want to connect to or dump database xyz in the test clust