I am trying to get streaming replication working with postgresql 9.3 on Ubuntu 13.04 (Raring Ringtail). I installed postgresql on master and slave by doing:

apt-get install postgresql

I believe I have all the bits in place for replication, except, pg_archivecleanup does not work. If I attempt to run it, I get it

The program 'pg_archivecleanup' is currently not installed. You can install it by typing: apt-get install postgres-xc-contrib

But that package installs Postgres-XC and blows up my postgresql which I do not wish to do.

The best my googling has come up with is this thread wherein a guy has the same issue with 9.2 and the only response is "You probably need to install -contrib subpackage as well." But doing:

apt-get install postgresql-contrib

I get:

postgresql-contrib is already the newest version.

So how the heck do I get pg_archivecleanup installed for PostgreSQL 9.3 on Ubuntu 13.04 (Raring Ringtail)?



| improve this question | | | | |
  • Can you show the result of apt-cache policy postgresql-contrib, that may help with the context. – Daniel Vérité Oct 3 '13 at 16:16
  • apt-cache policy postgresql-contrib postgresql-contrib: Installed: 9.3+146really9.2+147.pgdg12.4+1 Candidate: 9.3+149.pgdg12.4+1 Version table: 9.3+149.pgdg12.4+1 0 500 apt.postgresql.org/pub/repos/apt precise-pgdg/main amd64 Packages *** 9.3+146really9.2+147.pgdg12.4+1 0 100 /var/lib/dpkg/status 9.1+140 0 500 mirror.rackspace.com/ubuntu raring/main amd64 Packages – colour me brad Oct 4 '13 at 19:00
  • I can't get that above content to format correctly to save my life. – colour me brad Oct 4 '13 at 19:05

postgresql-contrib is a metapackage that depending on the context leads to the install of postgresql-contrib-9.3. The latter contains the files of interest.

Normally if you ran: dpkg -L postgresql-contrib-9.3 you should see among the files:


It's not in the default PATH, but that's expected.

And in reverse, the command dpkg -S pg_archivecleanup should output postgresql-contrib-9.3.

The suggestion from the shell's command-not-found handler to get it from postgres-xc is just not helpful in this case. Presumably it hits the first package that contains the command name.

| improve this answer | | | | |

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.