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

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.

  • I edited the question to clarify what I'm asking. Is it clear now, and if so how do I get the hold removed? – Bob Mar 11 '19 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. – Michael Hampton Mar 12 '19 at 0:04

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.

  • 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? – Bob Mar 12 '19 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. – John Mahowald Mar 12 '19 at 19:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.