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 1r8itD-00BKeX-BH for pgsql-general@arkaria.postgresql.org; Thu, 30 Nov 2023 15:23:43 +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 1r8itB-000T48-Jb for pgsql-general@arkaria.postgresql.org; Thu, 30 Nov 2023 15:23:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r8it9-000T40-Ra for pgsql-general@lists.postgresql.org; Thu, 30 Nov 2023 15:23:41 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r8it6-0087lH-F8 for pgsql-general@postgresql.org; Thu, 30 Nov 2023 15:23:38 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 07EFE5C00E8; Thu, 30 Nov 2023 10:23:34 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 30 Nov 2023 10:23:34 -0500 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=fm3; t= 1701357814; x=1701444214; bh=lTZw3+PbHghZC+UNTcbTc37qZrbhLN+EZVm G9HSYtKs=; b=a5BqJU33oiBO1tUi0GYJHAkLLb87TOibwfAmbzSy9RU+n7mrlwz WBMKItHxbQyzbBIxVzLfScOPjYp0InLKk9LpgsNMcOml/ZHHtpWQHQUAmJH6+qjo +DwwBHXWDbSkAUPqJ6y/U+zU0vtclFxzFWcKu+qcssl61t/VSTIKwyWlxtyqufMl PrrsefnlFtkIZTRmUPmIBq9FY4fMRiT4yAoeWAV3oWhw0T6+PWhogzCQBzwQBg1C 1JHlyIBeLvpoJRzp070du/6/B1u+K0+CIsjB+19l+2VNZ1+mJLWcGnsMCMzAVtfs G5CVCCS+2YhZNFBouYVJB4dGf2qllZxptGA== 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=fm1; t=1701357814; x= 1701444214; bh=lTZw3+PbHghZC+UNTcbTc37qZrbhLN+EZVmG9HSYtKs=; b=L 7vf2P8BjD0Y33CiD5jkyRRbibyoM0KeY4E5sNa4Iyfuy2JAb8mURV8/3c3lyp1pj c3RgivQ+w6dVcujNH63aMgUBj27iz41pDn5hf1lzljEJPNYyvK0Fomgeur69Z3Ra QFcms8VuAdWCMXoWeW42IhrATfgmpbAJBI4tdbzLd1SJK1jmkyISclnfJIkmh3uy rgCtqAzEoHER6ChI6Cc+CCekpAdd55+RB9Mo/Jihhb/+FeRkTJXrWB5AE7YU5hqF kbRqfX70hFUa6EYoZUpq3MBkU7Mvn6AW/BObg//CRuq+6HbZRwjDXR6xFxCEc6xz wcBrcczLzKdBbiSEIOZmA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeijedgjeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtke ertddtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepffelgeeife fgveduhedthfekuedtffejveegffegjeevtdehgfduieetfeehjeehnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvh gvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 30 Nov 2023 10:23:33 -0500 (EST) Message-ID: <477f32ab-72cc-4888-835a-0f25aa3db705@aklaver.com> Date: Thu, 30 Nov 2023 07:23:32 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Two started cluster on the same data directory and port To: Loles , PostgreSQL References: Content-Language: en-US From: Adrian Klaver In-Reply-To: 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 11/30/23 05:37, Loles wrote: > Hi! > > I have this situation on a server that is giving me problems. > > postgres@hostname:~$ pg_lsclusters > Ver Cluster  Port Status Owner    Data directory              Log file > 14  main     5432 online postgres /var/lib/postgresql/14/main > /var/log/postgresql/postgresql-14-main.log > 14  main_old 5432 online postgres /var/lib/postgresql/14/main > /var/log/postgresql/postgresql-14-main_old.log > > How can I stop, even delete, the main_old cluster? Assuming you are on Debian/Ubuntu. 1) sudo pg_ctlcluster stop 14 main_old This will stop the server for this session 2) sudo vi /etc/postgresql/14/main_old/start.conf Change auto to manual. This will keep the server from restarting on reboot. You can still start it using sudo pg_ctlcluster start 14 main_old Though if you want to do that then: vi /etc/postgresql/14/main_old/postgresql.conf and change port to something other then 5432. 3) If you have determined you really don't need that server and have all the data safely backed up or moved to the other server, then(THIS IS NOT REVERSIBLE): sudo pg_dropcluster 14 main_old > > Thanks! > -- Adrian Klaver adrian.klaver@aklaver.com