From: Ian Barwick <ian.barwick@2ndquadrant.com>
To: Erwin Moller <erwinmoller@xs4all.nl>
To: pgsql-general@lists.postgresql.org
Subject: Re: pg_dump problems: [archiver (db)] query failed: ERROR: relation "pg_opfamily" does not exist
Date: Tue, 20 Aug 2019 21:07:53 +0900
Message-ID: <63b4389d-41fe-de11-0427-2ae14acdffaa@2ndquadrant.com> (raw)
In-Reply-To: <dd470a99-372b-2e0a-c1fe-181f1c373d6d@xs4all.nl>
References: <dd470a99-372b-2e0a-c1fe-181f1c373d6d@xs4all.nl>
On 8/20/19 7:12 PM, Erwin Moller wrote:
> Hi,
>
> While trying to move an old 8.1 Postgres install to a new server with postgres 10.10, I get an error, listed hereunder:
> I am trying to get a mydump_x_x_x.sql file to use to reinstall on the target machine.
>
> From my new machine I connect to my old machine like this:
> erwin@ubuntu:~$ pg_dump -f "/home/erwin/mydump_$(date +%d_%m_%Y).sql" -C -h somehost.com -p 5433 -U myvalidusername -d myremotedb
> Password:
> pg_dump: [archiver (db)] query failed: ERROR: relation "pg_opfamily" does not exist
> pg_dump: [archiver (db)] query was: SELECT classid, objid, refclassid, refobjid, deptype FROM pg_depend WHERE deptype != 'p' AND deptype != 'e'
> UNION ALL
> SELECT 'pg_opfamily'::regclass AS classid, amopfamily AS objid, refclassid, refobjid, deptype FROM pg_depend d, pg_amop o WHERE deptype NOT IN ('p', 'e', 'i') AND classid = 'pg_amop'::regclass AND objid = o.oid AND NOT (refclassid = 'pg_opfamily'::regclass AND amopfamily = refobjid)
> UNION ALL
> SELECT 'pg_opfamily'::regclass AS classid, amprocfamily AS objid, refclassid, refobjid, deptype FROM pg_depend d, pg_amproc p WHERE deptype NOT IN ('p', 'e', 'i') AND classid = 'pg_amproc'::regclass AND objid = p.oid AND NOT (refclassid = 'pg_opfamily'::regclass AND amprocfamily = refobjid)
> ORDER BY 1,2
>
> And no archive is created.
>
> Does any of you kind people have advice? I am sure this worked on postgres9.
It looks like this was broken just before 10.10 was released, and has since been fixed;
see:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=6844adba54f7d96f30f834efc6d9aa1e5...
Your options are:
- find a 10.9 or earlier package and use the pg_dump from that
- build pg_dump yourself
- wait for 10.11 to come out (though I imagine that won't be for a month or two)
Regards
Ian Barwick
--
Ian Barwick https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ian.barwick@2ndquadrant.com, erwinmoller@xs4all.nl
Subject: Re: pg_dump problems: [archiver (db)] query failed: ERROR: relation "pg_opfamily" does not exist
In-Reply-To: <63b4389d-41fe-de11-0427-2ae14acdffaa@2ndquadrant.com>
References: <dd470a99-372b-2e0a-c1fe-181f1c373d6d@xs4all.nl> <63b4389d-41fe-de11-0427-2ae14acdffaa@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox