Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i042N-0006dY-2w for pgsql-general@arkaria.postgresql.org; Tue, 20 Aug 2019 13:18:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i042M-0001j1-0d for pgsql-general@arkaria.postgresql.org; Tue, 20 Aug 2019 13:18:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i042L-0001it-Ko for pgsql-general@lists.postgresql.org; Tue, 20 Aug 2019 13:18:57 +0000 Received: from lb1-smtp-cloud9.xs4all.net ([194.109.24.22]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1i042I-0005rl-Jz for pgsql-general@lists.postgresql.org; Tue, 20 Aug 2019 13:18:56 +0000 Received: from [192.168.0.31] ([31.149.253.9]) by smtp-cloud9.xs4all.net with ESMTPA id 042EiNNA9zaKO042FiuaJJ; Tue, 20 Aug 2019 15:18:51 +0200 Subject: Re: pg_dump problems: [archiver (db)] query failed: ERROR: relation "pg_opfamily" does not exist To: pgsql-general@lists.postgresql.org References: <63b4389d-41fe-de11-0427-2ae14acdffaa@2ndquadrant.com> From: Erwin Moller Message-ID: Date: Tue, 20 Aug 2019 15:18:50 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <63b4389d-41fe-de11-0427-2ae14acdffaa@2ndquadrant.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: nl X-CMAE-Envelope: MS4wfCTVrGWlsHrNqWdfTCYLKY1+W9A/HkA2A2b3qLn4tKN+ywmMCa1mWdcm3kzHoh9HtBz9R4wJUTN+q2iRaQ/OvzRbgB271/IZ5KmwXF7OtFYnquz/9z6C kFAQh0r7x1CpOKEv04ygxAWKwnejSMsbIDRkY5jFIhBvdeJIWB2CMjkRahH8L5KdGBx4hnp950TyAQ== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Op 8/20/2019 om 2:07 PM schreef Ian Barwick: > 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=6844adba54f7d96f30f834efc6d9aa1e52e5672d > > 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 > Thanks a lot, Ian! That saved me an upcoming headache. I searched a lot on Google but couldn't find any relevant information. Will installing Postgres 11 also work? (Not the Ubuntu18.04 default for Postgres, but doable). Or does those pg_dump versions also expect pg_opfamily to exist? Thanks for your time! Regards, Erwin Moller