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 1ntsSu-0000ED-SQ for pgsql-general@arkaria.postgresql.org; Wed, 25 May 2022 14:58:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ntsSt-0000kr-O2 for pgsql-general@arkaria.postgresql.org; Wed, 25 May 2022 14:58:23 +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 1ntsSt-0000kf-DT for pgsql-general@lists.postgresql.org; Wed, 25 May 2022 14:58:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntsSr-0000aL-Aw for pgsql-general@lists.postgresql.org; Wed, 25 May 2022 14:58:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 24PEwF7o1928116; Wed, 25 May 2022 10:58:15 -0400 From: Tom Lane To: Carsten Klein cc: pgsql-general@lists.postgresql.org Subject: Re: Connect to specific cluster on command line In-reply-to: References: <1923713.1653489317@sss.pgh.pa.us> Comments: In-reply-to Carsten Klein message dated "Wed, 25 May 2022 16:48:55 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1928114.1653490695.1@sss.pgh.pa.us> Date: Wed, 25 May 2022 10:58:15 -0400 Message-ID: <1928115.1653490695@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 option? Usually you'd use -p (--port). You *could* specify the exact path to the postmaster's socket via -h, but I think that's not idiomatic. regards, tom lane