Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nts1f-0007io-Q5 for pgsql-general@arkaria.postgresql.org; Wed, 25 May 2022 14:30:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nts1e-0001lJ-I2 for pgsql-general@arkaria.postgresql.org; Wed, 25 May 2022 14:30:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nts1e-0001jb-7U for pgsql-general@lists.postgresql.org; Wed, 25 May 2022 14:30:14 +0000 Received: from smtprelay03.ispgateway.de ([80.67.18.15]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nts1b-0000Kz-IK for pgsql-general@lists.postgresql.org; Wed, 25 May 2022 14:30:13 +0000 Received: from [109.90.124.214] (helo=mail.office.datagis.com) by smtprelay03.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nts1r-0002vb-ER for pgsql-general@lists.postgresql.org; Wed, 25 May 2022 16:30:27 +0200 Received: from localhost (intranator.datagis.local [127.0.0.1]) by localhost (Postfix) with ESMTP id 9679827A for ; Wed, 25 May 2022 16:30:07 +0200 (CEST) X-Virus-Scanned: by Intra2net Mail Security (AVE=8.3.64.148,VDF=8.19.16.46) X-Spam-Status: X-Spam-Level: 0 Received: from [192.168.12.10] (dslb-178-008-249-198.178.008.pools.vodafone-ip.de [178.8.249.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: smtp-auth-user) by mail.office.datagis.com (Postfix) with ESMTPSA id A970720B for ; Wed, 25 May 2022 16:30:05 +0200 (CEST) Message-ID: Date: Wed, 25 May 2022 16:30:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 To: pgsql-general@lists.postgresql.org Content-Language: en-US From: Carsten Klein Subject: Connect to specific cluster on command line Organization: DataGis Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Df-Sender: NTkwMDE1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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