1

I have a centos 7 vm that came with postgreSQL 9.2.24 and I recently installed postgreSQL 11 from the source from their site with the commands

./configure make su make install adduser postgres mkdir /usr/local/pgsql/data chown postgres /usr/local/pgsql/data 

And that worked without any errors. In /usr/local/pgsql/data there is a file called PG_VERSION which contains "11". However when I check what version I have with

pg_config --version 

It still returns the 9.2.24 version.

I'm going to install a postgres extension (timescaledb) which will use the postgres version shown by pg_config, and I want to install timescaledb with postgres 11. Also the machine has to be offline only, if that matters (which is why I installed from the source).

The part that I think may be confusing me is I don't currebtly have a database created, as I plan to create a new one when I have timescaledb ready to go.

2
  • I edited the question to clarify what I'm asking. Is it clear now, and if so how do I get the hold removed? Commented Mar 11, 2019 at 23:48
  • 1
    You should remove the previous version of PostgreSQL first. And of course you should not install from source if you can possibly avoid it (and you can). Such installations are not easily mantainable. To upgrade PostgreSQL you would have to do major surgery and possibly throw away the whole VM and start over. That might even be what has caused your problem today. Use RPM packages instead. Commented Mar 12, 2019 at 0:04

1 Answer 1

0

As Michael said, you need to remove the install of PostgreSQL you are not using first. Its a VM, backup anything you care about, throw it away, and rebuild. Then you can check that the correct pg_config is found in $PATH.

This will be easier if you continue with the package manager, yum in this case. You don't have to compile it, and known builds are easier to support. It will pull in dependencies and identify conflicting packages for you.

Because the OS updates don't ship a PostgreSQL new enough, choose which package you trust to install.

2
  • Ok, I made a new centos 7 VM and was able to completely remove the postgreSQL that came with it. I downloaded the postgreSQL 11 rpm file linked on the timescale website and moved it over to the offline vm. But I'm not sure yum is the way to go becuase it is having problems working offline. It keeps trying to ping mirrorlist.centos.org even though I have the rpm file in the current directory. Do you think using rpm instead will work, or would that only work with the source files? Commented Mar 12, 2019 at 17:08
  • You can download all required rpms with tools such as yumdownloader --resolve then ship them to the system to be installed by file name: yum install *.rpm. Or maintain a small yum repo on the local network. Commented Mar 12, 2019 at 19:16

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.