Re: Connect to specific cluster on command line - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Connect to specific cluster on command line
Date
Msg-id f6d2464d-352e-0e0f-1119-24a25900f300@aklaver.com
Whole thread Raw
In response to Connect to specific cluster on command line  (Carsten Klein <c.klein@datagis.com>)
List pgsql-general
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.

It postgresql-common provided as part of the Debian/Ubuntu packaging. If 
you want the documentation then:

man postgresql-common

> 
> 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?

On Debian/Ubuntu using their packaged versions then use the 
postgresql-common tool, it makes things a lot easier. Otherwise follow 
the instructions others have provided for using -h and -p. You will also 
need to do -h/-p if you are trying to reach remote instances of Postgres.

> 
> Regards, Carsten
> 
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Connect to specific cluster on command line
Next
From: Carsten Klein
Date:
Subject: Re: Connect to specific cluster on command line