Re: pg_dump problems: [archiver (db)] query failed: ERROR: relation"pg_opfamily" does not exist - Mailing list pgsql-general

From Erwin Moller
Subject Re: pg_dump problems: [archiver (db)] query failed: ERROR: relation"pg_opfamily" does not exist
Date
Msg-id 3aa2c1ea-1fa6-46d4-0bf2-3183210882c1@darwine.nl
Whole thread Raw
In response to Re: pg_dump problems: [archiver (db)] query failed: ERROR: relation"pg_opfamily" does not exist  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
On 8/20/2019 5:11 PM, Adrian Klaver wrote:
On 8/20/19 8:02 AM, Adrian Klaver wrote:
On 8/20/19 7:37 AM, Erwin Moller wrote:


That is a bummer.
Since I have no idea how to safely install an older version of pg_dump alongside my current 10.10 install, I will wait for the patch.

A quick test showed that:

1) Go here:
https://apt.postgresql.org/pub/repos/apt/pool/main/p/postgresql-11/

2) Grab
https://apt.postgresql.org/pub/repos/apt/pool/main/p/postgresql-11/postgresql-client-11_11.4-1.pgdg18.10%2b1_amd64.deb

3) Using Ark extract pg_dump from data.tar.xz at path
/usr/lib/postgresql/11/bin

Just to be clear I did the above in my home directory so as not to overwrite the installed programs.

Also probably not a bad idea to rename the below to something like pg_dump_11_4 to keep things straight.



./pg_dump -V
pg_dump (PostgreSQL) 11.4 (Ubuntu 11.4-1.pgdg18.10+1)




I do not have a 8.1 instance to try against, so I could not test that part

Thanks Adrian,

It took some time for me to get back to this, but thanks to your suggestions I got it working.
Since I am not too familiar with the inner workings of Ubuntu, some of your suggestions took me a while longer to parse, but with succes. ;-)

In case some other unskilled soul like me happens on this problem, here is what I did in babysteps:

I didn't want to grap the version you suggested (11.4), since I run 10.10, so I wanted to be safe and use 10.9 client tools:

Found it here:
https://apt.postgresql.org/pub/repos/apt/pool/main/p/postgresql-10/
postgresql-client-10_10.9-1.pgdg18.10+1_amd64.deb

I created a new directory in my home:
mkdir pg_dump_10.9
cd pg_dump_10.9
wget https://apt.postgresql.org/pub/repos/apt/pool/main/p/postgresql-10/postgresql-client-10_10.9-1.pgdg18.10+1_amd64.deb

now how to extract my pg_dump? After a short Google I did the following:
dpkg-deb -R ./postgresql-client-10_10.9-1.pgdg18.10+1_amd64.deb tmp

then walked to the right (new) directory:
cd tmp/usr/lib/postgresql/10/bin

There it was.: pg_dump from 10.9. Yes!
I moved it to my home-dir, and renamed it as you suggested (to avoid confusion).

Work right from there. :-)

I was expecting all kind of dependencies I had to solve, but it worked right out of the box.

Thanks Adrian.

Regards,
Erwin Moller

pgsql-general by date:

Previous
From: Ayub M
Date:
Subject: Re: pgbouncer with ldap
Next
From: "Kumar, Virendra"
Date:
Subject: RE: Running a Simple Update Statement Fails, Second Time Suceeds.