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 1r8j1o-00BLNq-C8 for pgsql-general@arkaria.postgresql.org; Thu, 30 Nov 2023 15:32:36 +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 1r8j1m-000WWs-Up for pgsql-general@arkaria.postgresql.org; Thu, 30 Nov 2023 15:32:34 +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 1r8j1m-000WWk-Js for pgsql-general@lists.postgresql.org; Thu, 30 Nov 2023 15:32:34 +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 1r8j1k-0087oh-2V for pgsql-general@postgresql.org; Thu, 30 Nov 2023 15:32:33 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 864125C00D5; Thu, 30 Nov 2023 10:32:31 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 30 Nov 2023 10:32:31 -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= 1701358351; x=1701444751; bh=lm4BAHohhUxRRBm3weDDLZVOt2ujoRN6yxF HLGZ8s20=; b=NNlJU0uRMYDd/FIORoqkEN6grinHzdWBVWz0j0DyLOSOiciQnoT 7AkdkeMpxNjYo8gnegphpYFTjYqBDKGllTP0+PzehZSgqGlI9u36AcqHJXjo5eMx aG5DC8Sn+E6yUgP35+1LwA/rFBh3GCoykFwEXUggdOjCFiAyJX/ph2LCVy/9MTI6 sHH+GwOVnDZzrRpZlCjQYksPF6woopOxV2BIobqL9wxqHzW3UtxzMT9NWu7D1oXm bqZW5/azCRmfBI6NS1/OFzwm40JDORm9e47iWS9yyDztRPKhdgJ7FfYY9UIOk251 XK45lSBtQfqBwNO21PFfqFBsyl3ev46G3Hw== 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=1701358351; x= 1701444751; bh=lm4BAHohhUxRRBm3weDDLZVOt2ujoRN6yxFHLGZ8s20=; b=O /MBNEXIOqsdEfSY0KziNWusvHMko1B6KXU1Db6Lo/Fgb+bgHzeOI5KsObf9O17WE /Z5kdlt0vl6FAucICyQrxcwbvwl2eFwB9t9FV3qE4d+KCZJ/cm/0cjaTc5riK52r Cnd9pJaWbSe3Ka62d8IbYZTKnB8b4DjZf//PjbXjXQVLC9WOIVcGd0yyDZoPUnoC K2MH6Lp9bl5hj2QpTiDjxHcRjrCwD6Wh/dcAfUPjFgEzSZH1VhaHSPBA7lcCjtWv IFhyrC4FGlSGiRSeNupVM20SHKtLaGkO/QOsxUVN23L7t2ZLRgdSc4GXQe7Flvvi KvYvG7LYQAVu+4ePr0Yxg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeijedgjeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuhffvfhgjtgfgsehtke ertddtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhephfduveeufe evffejieegheffteetheejveettdfgtdefvdegjefgvedvfefhteffnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvh gvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 30 Nov 2023 10:32:30 -0500 (EST) Message-ID: Date: Thu, 30 Nov 2023 07:32:30 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Two started cluster on the same data directory and port Content-Language: en-US From: Adrian Klaver To: Loles , PostgreSQL References: <477f32ab-72cc-4888-835a-0f25aa3db705@aklaver.com> In-Reply-To: <477f32ab-72cc-4888-835a-0f25aa3db705@aklaver.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 11/30/23 07:23, Adrian Klaver wrote: > 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 Blaming it on not enough coffee, but I just noticed both clusters are pointing at the same data directory. I would NOT do: sudo pg_dropcluster 14 main_old > >> >> Thanks! >> > -- Adrian Klaver adrian.klaver@aklaver.com