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 1pslnE-0004UD-Ge for pgsql-general@arkaria.postgresql.org; Sat, 29 Apr 2023 14:43:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pslmE-0006C6-EO for pgsql-general@arkaria.postgresql.org; Sat, 29 Apr 2023 14:42:18 +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 1pslmC-0006Bx-M2 for pgsql-general@lists.postgresql.org; Sat, 29 Apr 2023 14:42:17 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pslm4-002Xcg-Kg for pgsql-general@lists.postgresql.org; Sat, 29 Apr 2023 14:42:15 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 26F123200929; Sat, 29 Apr 2023 10:42:06 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 29 Apr 2023 10:42:06 -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=fm2; t= 1682779325; x=1682865725; bh=Nk9kbmbiEXQoYo/HlHc32321gE3m3VWVAHQ zte3deuE=; b=YE2IcwRfcw+g3BL5XxKpIrSo0WXcilsNX1NCZUWmFjbn7bfAyHF m0R5GDwpOcjuiQzBaOwqnK6Y7frwd8IGbBU0sldJBZN0dcCluRtm8uZkoXoZvo59 FVIdhmB8hLh6qoBkgNCGvgYFejnOVR6r3FWQBqTy83jFl6DJwAVmH8AADg5/pZ9i +kAT9qbuUC3d+JemA6xgEv8ePcRpOBDYbECzhfMRcy+TYhlghZXMadIiRJAS+Ima gfJ3DPVwHS1EyEv5QhdfKSwQSficSdeuJh0Gu6qxK/bdr0JfOIuEqwZ/B4id2wNr n7KLDW6lFkEWbOAHHPE7De1kzVCBl/TtIYg== 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=fm3; t=1682779325; x= 1682865725; bh=Nk9kbmbiEXQoYo/HlHc32321gE3m3VWVAHQzte3deuE=; b=T w5FN6XrFGHfrRjL4V/Hj+WeYL1n5QHD62hFv1hxOLPa799Wkyc8xaEd/5GxF4SEw 0591jYIP6ezR6+Ogjy3MQScKAvaHfSYjpDW0Ewund06XsX5eYjYESKwZ+ZBFDXGy 4/VNBNW7Pcp2FZU1CIDUFOpwZlJIsCY8NkJTnNJGlxSknI5jRNs5+4oaqzTvNG4B I/0J85nGEMK0FoUz0xlEsOhVokEauc+wqonqVsf0q8fCgN57QbwmVckes9UwyCPg BoW/XA7O0dERbNnNCbD9t4mwTGzuixmtduYIwvEIQ1Y6Dyp3C3+1BGYb2bJqgEaw IEGtDHyWBpGSbT0zoF5Qw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedvtddgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtke ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepledtveelgf ffteejlefhkeeitdduieekfedttdekkeefvdegvdelkeeitdekhefgnecuffhomhgrihhn pehsvghrvhgvrhdqfihorhhlugdrihhnfhhonecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgv rhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 29 Apr 2023 10:42:05 -0400 (EDT) Message-ID: Date: Sat, 29 Apr 2023 07:42:04 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Multiple Postgrest Verisons how to set one version as default. To: Gautham Raj , pgsql-general@lists.postgresql.org 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 4/29/23 05:28, Gautham Raj wrote: > Hi, > > *Problem: Having multiple versions of Postgres installed in CentOS 7. I > Want to set the 9.5 version as default. Not able to access Postgres 9.5 > through the terminal as well.* Not clear if you want to have the default psql client be 9.5 or the Postgres server be 9.5? > > 1. For Command *psql --version* I'm getting 9.5 as the version. > 2. For Command *sudo -u postgres psql *I'm getting 9.2 as the version. Why are you doing 2)? > > Please look at the below screenshot. > Screenshot from 2023-04-28 21-14-29.png > > *Background: *By default, the server has a 9.2 version I installed the > *rh-postgresql95* version from the below article. > Used the below command to install *rh-postgresql95* > > yum >  --enablerepo=centos-sclo-rh -y install rh-postgresql95-postgresql-server > > https://www.server-world.info/en/note?os=CentOS_7&p=postgresql95&f=1 > > > Tried updating the PATH variable correctly with the latest version. But > not working. > > Screenshot from 2023-04-28 21-28-44.png > > > Please share the steps or any guidance on how to resolve the issue. > > Thank you so much. Anything would be helpful. > > Thanks & Regards, > Gautham -- Adrian Klaver adrian.klaver@aklaver.com