6

I need to use pg_dump for postgres 10.4 on my EC2 instance. My AMI version is:

$ cat /etc/system-release Amazon Linux AMI release 2018.03

I've tried to get it from this repo: https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat10-10-2.noarch.rpm, then install postgres tools by command sudo yum install postgres10 but it works only for Amazon Linux 2.

Do you have any idea how can I get Postgres10 for my instance?

1 Answer 1

7

I haven't been able to find any existing packages for version 10, here is how I compiled the client tools myself on the 2018.03 AMI

sudo yum install -y gcc readline-devel zlib-devel

wget https://ftp.postgresql.org/pub/source/v10.4/postgresql-10.4.tar.gz
tar -xf postgresql-10.4.tar.gz
cd postgresql-10.4

./configure
make -C src/bin
sudo make -C src/bin install

make -C src/include
sudo make -C src/include install

make -C src/interfaces
sudo make -C src/interfaces install

make -C doc
sudo make -C doc install

After this you can run pg_dump from /usr/local/pgsql/bin/pg_dump or alternatively add /usr/local/pgsql/bin to your PATH to run pg_dump anywhere

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you. I've found binaries here: enterprisedb.com/download-postgresql-binaries and if I download and run them, it also works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.