1

So I have Ubuntu 14.04 with postgres 9.6 and I wanted to install pg_repack so I did

sudo apt-get install pgxnclient`
sudo pgxn install pg_repack

but I got an error (sorry I forgot the error) and I found a site saying I need

sudo apt-get install postgresql-server-dev-all
sudo apt-get install postgresql-common

I suspect that one or both of those came in as Postgresql 10 because when I did

sudo pgxn install pg_repack

it seems to work except for that it is putting the files in /usr/lib/postgresql/10/bin when I'm still running 9.6 server.

Can I just move that to /usr/lib/postgresql/9.6/bin or is there something specific about it to postgres10 that won't work if I just move it?

Secondly, how do I configure pgxn to use 9.6 and not 10?

The website here is dead so I imagine there's documentation out there that I can't get.

1

pgxn will install using the PostgreSQL associated with whatever pg_config it finds first in $PATH. If you set your PATH (either permanently or temporarily) to list first the directory containing that pg_config then that should fix the problem

sudo su
PATH=/some/version/postgres/bin:$PATH
pgxn install pg_repack
  • 1
    OK this didn't solve my problem directly but it got me going in the right direction. I didn't have any postgres/bin in my path but my /usr/bin (which is in the path) had the ver 10 of pg_config so I copied the ver 9.6 to my usr/bin and then ran the install command again which solved the problem. – Dean MacGregor Apr 6 '18 at 15:17

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.