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 1i05eO-0001uZ-Sh for pgsql-general@arkaria.postgresql.org; Tue, 20 Aug 2019 15:02:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i05eN-0003gn-B7 for pgsql-general@arkaria.postgresql.org; Tue, 20 Aug 2019 15:02:19 +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 1i05eL-0003gV-Oz for pgsql-general@lists.postgresql.org; Tue, 20 Aug 2019 15:02:18 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1i05eE-0006vX-LO for pgsql-general@lists.postgresql.org; Tue, 20 Aug 2019 15:02:16 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C2DCD21448; Tue, 20 Aug 2019 11:02:09 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 20 Aug 2019 11:02:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=h 2agCs5SEw4lPrfri5u1h1Tpg8n2T1k+7h6yjIrOLRo=; b=BgPTyJL0eGnEMGXeT 22j3hMa270IL1dlxOt3zJt445ucZSTTN33dYWOJcuD8NIluC/voEUafnkRpNsLTM yW/3S+r899Sxs0Ikwm9i52rEjU7pTbTx0MuPRvrbipfBq3iyd/420SNv4XTg/cks 2s/jH60RJ/RX9ySTr7FB5rZbq4U2vWeiVgY728/Ir5GDQt5yz6ZY1uG5HhQ1e47G vHC3F/I/k2AKuA3QVdExvymnqWXtITkWmv3uzOTjXdKIWzUxi7pvN0yYzSp+H0bl XiH9imGPIR4jgnvUV49EDvQBjcsfoBXyAd8J/szn+nvNOhIQBEsNml/GDYLtvR2V BoATg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=h2agCs5SEw4lPrfri5u1h1Tpg8n2T1k+7h6yjIrOL Ro=; b=FvJf3/eZOUT9QYboWm/rTk749oltx7fYxoyWDhMypm5S2IMzAr1BSZgJx 27IkzUhm26JgBhYl2V2IETmA8R5jtlq5Y/CLdTAPBGcFDwRJwWgJl6Vy5SaGtiv7 KmDsSJ4BfA9JDHvphKp0f8TS907VmvbclzzFmHAZ1zxO6ZcSeiZxQj5HZQmv3tY2 QWP+qXeRUPLrRkRNU7JoK9ByGv2DEaitj5LVRrvo2wER+K/ixqp4TLqhZiaR5XbL Nq3nPrDnTjDxUIqp3EG4/CY52eOwz41z+coWwDzyBqUmU1F8mzoNuAOnJCHyOdQY ElLuo7zDgOr1mPhSy5uDjUSgOy2HA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudeguddgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgpdhsohhmvghhohhsthdr tghomhenucfkphepjedurddvuddvrdduhedtrddvtddvnecurfgrrhgrmhepmhgrihhlfh hrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmnecuvehluhhs thgvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id 904F6380079; Tue, 20 Aug 2019 11:02:08 -0400 (EDT) Subject: Re: pg_dump problems: [archiver (db)] query failed: ERROR: relation "pg_opfamily" does not exist To: Erwin Moller , pgsql-general@lists.postgresql.org References: <63b4389d-41fe-de11-0427-2ae14acdffaa@2ndquadrant.com> <384ce3f0-79d7-b5d2-494d-4374eaddb7db@darwine.nl> From: Adrian Klaver Message-ID: <52d04185-f4ac-fe44-2e97-4646be3a0fae@aklaver.com> Date: Tue, 20 Aug 2019 08:02:07 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <384ce3f0-79d7-b5d2-494d-4374eaddb7db@darwine.nl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 8/20/19 7:37 AM, Erwin Moller wrote: > > Op 8/20/2019 om 3:32 PM schreef Adrian Klaver: >> On 8/20/19 6:18 AM, Erwin Moller wrote: >>> >>> >>> 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? >> >> >> From the bug that introduced the issue: >> >> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=07b39083c >> >> "Per bug #15934 from Tom Gottfried.  Back-patch to all supported >> branches." >> >> So I'm guessing it is in the most recent release of all current versions. > > Thank you, Adrian. > > 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 ./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. > > Thank you for your responses! > > Regards, > Erwin Moller > > > > > -- Adrian Klaver adrian.klaver@aklaver.com