Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f8odG-0005TS-7J for pgsql-general@arkaria.postgresql.org; Wed, 18 Apr 2018 15:04:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f8odE-0005M9-K2 for pgsql-general@arkaria.postgresql.org; Wed, 18 Apr 2018 15:04:24 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f8odE-0005Lx-8S for pgsql-general@lists.postgresql.org; Wed, 18 Apr 2018 15:04:24 +0000 Received: from mx3-rdu2.redhat.com ([66.187.233.73] helo=mx1.redhat.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f8odB-0003F5-T5 for pgsql-general@postgresql.org; Wed, 18 Apr 2018 15:04:23 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C20E781638F1; Wed, 18 Apr 2018 15:04:20 +0000 (UTC) Received: from nb.usersys.redhat.com (ovpn-200-30.brq.redhat.com [10.40.200.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id DACF1215CDC8; Wed, 18 Apr 2018 15:04:19 +0000 (UTC) From: Pavel Raiskup To: Adrian Klaver Cc: Tom Lane , pgsql-general@postgresql.org Subject: Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Date: Wed, 18 Apr 2018 17:04:19 +0200 Message-ID: <3771637.ZVFRVXCO1T@nb.usersys.redhat.com> In-Reply-To: References: <2188861.rCBv2PnPJv@nb.usersys.redhat.com> <29770.1524061343@sss.pgh.pa.us> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 18 Apr 2018 15:04:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 18 Apr 2018 15:04:20 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'praiskup@redhat.com' RCPT:'' List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wednesday, April 18, 2018 4:43:01 PM CEST Adrian Klaver wrote: > On 04/18/2018 07:22 AM, Tom Lane wrote: > > Pavel Raiskup writes: > >> . and it seems like the hstore.so was somewhat intimately integrated into > >> OP's database so the '/usr/bin/pg_dump --schema-only --binary-upgrade > >> --format=custom' called through 'pg_upgrade' failed with: > >> pg_dump: [archiver (db)] query failed: ERROR: could not access file > >> "$libdir/hstore": No such file or directory > >> Which means that the dump from old datadir, with old server (without > >> hstore.so packaged) failed. But playing with hstore.so a bit, the upgrade > >> always worked smoothly for me even without the "old" hstore.so > > > > Hi Pavel, > > > > There are certainly plenty of reasons why extension .so's might be needed > > during pg_dump, even in a binary-upgrade situation. The first example > > that comes to mind is that an hstore-type constant appearing in a view > > definition would require hstore_out() to be invoked while dumping the view > > definition. > > I am obviously missing something. If the old server was using hstore in > a database how could hstore.so could be accessible to it but not pg_dump? Because on Fedora we usually run pg_upgrade after distribution upgrade (e.g. for Fedora 27 => Fedora 28 upgrade it means also upgrade from PostgreSQL 9.6 to 10), and then we provide the old server in different package (postgresql-upgrade) which has limited feature set (including the missing hstore.so module). Pavel > > > > I don't remember anymore whether I'd set up the postgresql-update package > > to include the contrib modules for the old server version. If I didn't, > > it was an oversight :-(. > > > > regards, tom lane > > > > > > >