Re: Connect to specific cluster on command line

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Carsten Klein <c(dot)klein(at)datagis(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Connect to specific cluster on command line
Date: 2022-05-25 15:23:20
Message-ID: f6d2464d-352e-0e0f-1119-24a25900f300@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Carsten Klein 2022-05-25 15:26:03 Re: Connect to specific cluster on command line
Previous Message David G. Johnston 2022-05-25 15:05:11 Re: Connect to specific cluster on command line