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 1pkurh-0002FA-ET for pgsql-general@arkaria.postgresql.org; Fri, 07 Apr 2023 22:47:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pkurg-00088k-7E for pgsql-general@arkaria.postgresql.org; Fri, 07 Apr 2023 22:47:28 +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 1pkurf-00088b-0t for pgsql-general@lists.postgresql.org; Fri, 07 Apr 2023 22:47:27 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pkurY-0001hA-RA for pgsql-general@lists.postgresql.org; Fri, 07 Apr 2023 22:47:26 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 10F57320030E; Fri, 7 Apr 2023 18:47:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 07 Apr 2023 18:47:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1680907638; x=1680994038; bh=5VOlQUaioS0QxA++HsNKyvIaQ7qjqrCnEjY Vcw4xSbM=; b=spQwd47PUvCYi0i4oY5aSRNpRhyrGv92gv/vAHBwus0NiHdLfEj ALMOBLanOjJ7Xn4ODIcYyJACSfgK9ak7kFV8nRyHc3yXIjUaGsaFQd0MgEiczZY2 Ow0ErCeXAdBk1jxDN0Vy1alFFB+UD3BNtRsTi3+aSjCrBXeZx6IT2RkLn48FqS3N 1n04qkS1zJW/YPZLkHvOdEY8pA5AyvSy0anwoGqsyDGLZe0X/OnlwbuOMqeGHXty kBo16G0Z2IAEGiGdK1w/kGrCwchwlFRPER/4MD/FJX8GsQu/AcztKtNTq2LsMhhv o/jX2tZfS+kyCV3wQM45Vl9pJalLsoWjAaA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1680907638; x= 1680994038; bh=5VOlQUaioS0QxA++HsNKyvIaQ7qjqrCnEjYVcw4xSbM=; b=W V712q/pnhBYJtrnnQLaGPVLar5VuhjxR6e37yFBpEZmLwiD6JIHTJ8xE4CVmI3Ke CaGZwFyFjQcWVm0CBNEY51T1ydGdBqJLN6z2Bkx8ImjPqfDz/pUtqIuhS4PRt/Sv P5habeokWS9FW3vxtKk9C29Nc5R5EP/JRmK/5TNv4AymisfXwngtrsNNJRma11xX 9Acl3HmO0Nq2ujfHb7QlzdR1Nqs0pBXj4jkDr/eUIxD3X/sZXFReNWlO1CEjIZHY bssHhbpNKnWKpvf2TA4P9JNx+BMx//MARkqwR93rMbBm6CUhWv8kpuzwcZ9ijwlW aiwr1QdGVhwKnNVT3UtXw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejiedgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpedugfeuleegveffhfegleejhefhtedtgeeileeggfeh fefffeevgeejtdeutefftdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 7 Apr 2023 18:47:18 -0400 (EDT) Message-ID: <5beba911-281c-685f-509a-73d7af990897@aklaver.com> Date: Fri, 7 Apr 2023 15:47:17 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: pg_ctlcluster is not stopping cluster Content-Language: en-US To: Telium Technical Support , pgsql-general@lists.postgresql.org References: <010001875dd4ebe6-ba96b71f-2461-45da-ab24-0abf56f56f4f-000000@email.amazonses.com> From: Adrian Klaver In-Reply-To: <010001875dd4ebe6-ba96b71f-2461-45da-ab24-0abf56f56f4f-000000@email.amazonses.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 4/7/23 15:27, Telium Technical Support wrote: > I am string to stop my PostgreSQL (on debian 11) server using the > following command > > root@d11:/# sudo -u postgres /usr/bin/pg_ctlcluster 15 main stop -- -m > fast -D /var/lib/postgresql/13/main > > Notice: extra pg_ctl/postgres options given, bypassing systemctl for > stop operation > > pg_ctl: PID file "/var/lib/postgresql/13/main/postmaster.pid" does not exist > > Is server running? > > The notice is correct, the is no such postmaster.pid file in that > directory, but yes the service is running. I can confirm it's running with: > > root@d11:/# sudo -u postgres /usr/bin/pg_ctlcluster 15 main status -- -D > /var/lib/postgresql/13/main > > pg_ctl: server is running (PID: 2701882) > > /usr/lib/postgresql/15/bin/postgres "-D" "/var/lib/postgresql/13/main" > "-c" "config_file=/etc/postgresql/15/main/postgresql.conf" > > So why is my stop command being ignored? (I tried without the -m fast > option but no change, and I'd like to keep that for other reasons). I > confirmed with 'ps ax' that postgresql 15 is running, despite the > directory suggesting it might be 13.  Coincidentally, there is a > postmaster.pid file in a directory OTHER than the data directory: > > /var/lib/postgresql/15/main/postmaster.pid > > (and notice the 15). Is this a clue? Yes that this: sudo -u postgres /usr/bin/pg_ctlcluster 15 main stop -- -m fast -D /var/lib/postgresql/13/main is not correct. First do: pg_lsclusters to determine what is actually running. Then do sudo -u postgres /usr/bin/pg_ctlcluster main stop -- -m fast -D /var/lib/postgresql/13/main stop -m fast for whatever version is running. > -- Adrian Klaver adrian.klaver@aklaver.com