after update Centos 7.9 psql back into old version

Issues related to applications and software problems
Post Reply
Bear4
Posts: 7
Joined: 2021/03/03 07:09:24

after update Centos 7.9 psql back into old version

Post by Bear4 » 2021/10/19 11:04:08

Sorry this is not after update, (Update today CentOS v 7.9 and after check)
on root: psql -V -> psql (PostgreSQL) 9.2.24
and on user: psql -V -> psql (PostgreSQL) 11.6

(CentOS Linux release 7.9.2009 (Core))

Despite I have a newer version installed - PostgreSQL 11.6
ps -ef | grep postgres -> /usr/pgsql-11/bin/postmaster -D /var/lib/pgsql/11/data

yum list | grep postgres
postgresql.x86_64 9.2.24-7.el7_9 @updates
postgresql-libs.x86_64 9.2.24-7.el7_9 @updates
postgresql11.x86_64 11.6-2PGDG.rhel7 @pgdg11
postgresql11-contrib.x86_64 11.6-2PGDG.rhel7 @pgdg11
postgresql11-libs.x86_64 11.6-2PGDG.rhel7 @pgdg11
postgresql11-server.x86_64 11.6-2PGDG.rhel7 @pgdg11

How to fix this frick? Or how to switch into psql version 11 ?

In /etc/yum.repos.d -> pgdg-redhat-all.repo
there is no postgresql 9.2 ... have postgresql 12 to 9.4
Last edited by Bear4 on 2021/10/19 11:47:12, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: after update Centos 7.9 psql back into old version

Post by TrevorH » 2021/10/19 11:43:14

We supply postgresql 9.2 in the base/updates repo. If you install from there then you will also get updates from there. I'd suggest looking in /var/log/yum.log* or using yum history to find out when/how/why things were installed/updated.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Bear4
Posts: 7
Joined: 2021/03/03 07:09:24

Re: after update Centos 7.9 psql back into old version

Post by Bear4 » 2021/10/19 11:47:56

Thanks!

tunk
Posts: 1204
Joined: 2017/02/22 15:08:17

Re: after update Centos 7.9 psql back into old version

Post by tunk » 2021/10/19 13:28:36

Never used postgresql so I wouldn't really know, but you could check this:
- how is postmaster started, and with which user?
- look at login scripts and environmental variables for "user"

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: after update Centos 7.9 psql back into old version

Post by jlehtone » 2021/10/19 14:36:29

tunk wrote:
2021/10/19 13:28:36
Never used postgresql so I wouldn't really know, but you could check this:
- how is postmaster started, and with which user?
- look at login scripts and environmental variables for "user"
This is a good point.
Bear4 wrote:
2021/10/19 11:04:08
on root: psql -V -> psql (PostgreSQL) 9.2.24
and on user: psql -V -> psql (PostgreSQL) 11.6
Asking which psql as both of these users will give different paths.
Explanation can probably be seen with echo $PATH as each user
and looking into ~/.bash_profile

Also rpm -qi postgresql11 postgresql shows the "Install Date" of those packages.

Post Reply