Home > Blockchain >  How to install specific version of postgresql?
How to install specific version of postgresql?

Time:10-29

I followed the guide from below:

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > 
/etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install postgresqlVERSION

The problem comes when I try to search for postgresql-10.13, which is the desired version for me. I don't know why the only available is the one below:

apt-cache policy postgresql-10
postgresql-10:
  Installed: (none)
  Candidate: 10.18-1.pgdg18.04 1
  Version table:
     10.18-1.pgdg18.04 1 500
        500 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main amd64 Packages

CodePudding user response:

Starting with 10, the major version is the first number only, and the bug fix is the second. You only get the current bug fix of each major release from the repo. If you really want a known buggy version, you can get the source from git and compile.

  • Related