Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qteNh-00DNic-35 for pgsql-admin@arkaria.postgresql.org; Fri, 20 Oct 2023 01:32:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qteNe-00AbU4-RT for pgsql-admin@arkaria.postgresql.org; Fri, 20 Oct 2023 01:32:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qteNe-00AbTo-GW for pgsql-admin@lists.postgresql.org; Fri, 20 Oct 2023 01:32:51 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qteNb-001ddR-F7 for pgsql-admin@lists.postgresql.org; Fri, 20 Oct 2023 01:32:50 +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 39K1WlxR3667894; Thu, 19 Oct 2023 21:32:47 -0400 From: Tom Lane To: Sbob cc: Pgsql-admin Subject: Re: using pg_ctl over ssh hangs In-reply-to: References: Comments: In-reply-to Sbob message dated "Thu, 19 Oct 2023 19:24:37 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3667892.1697765567.1@sss.pgh.pa.us> Date: Thu, 19 Oct 2023 21:32:47 -0400 Message-ID: <3667893.1697765567@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Sbob writes: > I am wanting to run pg_ctl as a command over ssh, however when I pass > start it hangs until I do a Ctl-C > $ ssh -T postgres@${node3} "/usr/pgsql-14/bin/pg_ctl -D > /var/lib/pgsql/14/data start" If you don't specify a log file (-l option to pg_ctl) then the postmaster's stdout doesn't get dissociated from the calling terminal, which likely explains why ssh doesn't think the session is done. regards, tom lane