Postgres Version want to update from 9.2 to 9.5 version in CentOS 7.9

Started by Gautham Rajalmost 3 years ago4 messageshackers
Jump to latest
#1Gautham Raj
gauthamrajsunny@gmail.com

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.*

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.

Please look at the below screenshot.
[image: 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 <https://www.server-world.info/en/command/html/yum.html&gt; --enablerepo=centos-sclo-rh
-y install rh-postgresql95-postgresql-server

https://www.server-world.info/en/note?os=CentOS_7&amp;p=postgresql95&amp;f=1

Tried updating the PATH variable correctly with the latest version. But not
working.

[image: Screenshot from 2023-04-28 21-28-44.png]

Please share the steps or any guidance on how to resolve the issue.

Thankyou so much. Anything would be helpful.

Thanks & Regards,
Gautham

Attachments:

Screenshot from 2023-04-28 21-14-29.pngimage/png; name="Screenshot from 2023-04-28 21-14-29.png"Download
Screenshot from 2023-04-28 21-28-44.pngimage/png; name="Screenshot from 2023-04-28 21-28-44.png"Download
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Gautham Raj (#1)
Re: Postgres Version want to update from 9.2 to 9.5 version in CentOS 7.9

Gautham Raj <gauthamrajsunny@gmail.com> writes:

*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.*

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.

You'd need to read up on Red Hat's "SCL" packaging system to understand
how to use that rh-postgresql95 package. SCL is since my time there,
but I'm pretty sure it's intentional that it's not in the default PATH.

But TBH, all the versions available from Red Hat for RHEL7/CentOS7 are
out of support as far as the upstream community is concerned; to us it's
pretty mystifying why you'd be trying to migrate to an already-years-dead
release branch. I'd suggest getting some more modern release from
https://www.postgresql.org/download/

regards, tom lane

#3Gautham Raj
gauthamrajsunny@gmail.com
In reply to: Tom Lane (#2)
Re: Postgres Version want to update from 9.2 to 9.5 version in CentOS 7.9

Thank you for the quick response.

Yes, I'm willing to get the latest version. I read some articles CentOS 7
doesn't support the latest versions. So was trying the old versions.

I tried the article shared but, got the below error at the step.

[image: image.png]
Something is wrong here.

Please suggest the steps for resolving this issue.

Thanks & Regards,
Gautham

On Fri, Apr 28, 2023 at 10:08 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Show quoted text

Gautham Raj <gauthamrajsunny@gmail.com> writes:

*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.*

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.

You'd need to read up on Red Hat's "SCL" packaging system to understand
how to use that rh-postgresql95 package. SCL is since my time there,
but I'm pretty sure it's intentional that it's not in the default PATH.

But TBH, all the versions available from Red Hat for RHEL7/CentOS7 are
out of support as far as the upstream community is concerned; to us it's
pretty mystifying why you'd be trying to migrate to an already-years-dead
release branch. I'd suggest getting some more modern release from
https://www.postgresql.org/download/

regards, tom lane

Attachments:

image.pngimage/png; name=image.pngDownload
#4Roberto Mello
rmello@cc.usu.edu
In reply to: Gautham Raj (#3)
Re: Postgres Version want to update from 9.2 to 9.5 version in CentOS 7.9

On Fri, Apr 28, 2023 at 12:10 PM Gautham Raj <gauthamrajsunny@gmail.com>
wrote:

Thank you for the quick response.

Yes, I'm willing to get the latest version. I read some articles CentOS 7
doesn't support the latest versions. So was trying the old versions.

I tried the article shared but, got the below error at the step.

You have bigger problems to solve with your setup. Basic programs are
failing to run, so there are other things that need fixing with your
package manager that are completely unrelated to PostgreSQL.

Although Tom kindly responded to your initial question, this list
(-hackers) is the wrong place to be asking that type of question, as its
purpose is to discuss the *development* of PostgreSQL, not installation and
upgrade issues.

There are many other places better suited to your question, including the
pgsql-general list [1]https://www.postgresql.org/list/pgsql-general/, IRC channel [2]https://www.postgresql.org/community/irc/ and Slack channel [3]https://join.slack.com/t/postgresteam/shared_invite/zt-1qj14i9sj-E9WqIFlvcOiHsEk2yFEMjA.

-Roberto

[1]: https://www.postgresql.org/list/pgsql-general/
[2]: https://www.postgresql.org/community/irc/
[3]: https://join.slack.com/t/postgresteam/shared_invite/zt-1qj14i9sj-E9WqIFlvcOiHsEk2yFEMjA
https://join.slack.com/t/postgresteam/shared_invite/zt-1qj14i9sj-E9WqIFlvcOiHsEk2yFEMjA