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 1h4uN5-0001Av-6w for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Mar 2019 21:28:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h4uN3-0001Qr-RH for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Mar 2019 21:28:05 +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 1h4uN3-0001Ey-F7 for pgsql-bugs@lists.postgresql.org; Fri, 15 Mar 2019 21:28:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4uN0-000123-Oc for pgsql-bugs@lists.postgresql.org; Fri, 15 Mar 2019 21:28:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x2FLRxoo013987; Fri, 15 Mar 2019 17:27:59 -0400 From: Tom Lane To: Cherio cc: pgsql-bugs@lists.postgresql.org Subject: Re: pg_restore: [archiver (db)] could not execute query: ERROR: operator does not exist: public.hstore = public.hstore In-reply-to: References: Comments: In-reply-to Cherio message dated "Fri, 15 Mar 2019 17:12:13 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13984.1552685279.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 15 Mar 2019 17:27:59 -0400 Message-ID: <13985.1552685279@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Cherio writes: > I am exporting DB from 10.6 and importing into 10.7 and an UPDATE rule > fails to restore: > pg_restore: [archiver (db)] could not execute query: ERROR: operator do= es > not exist: public.hstore =3D public.hstore > From the log I can see that hstore was extension successfully created It's probably not in the search_path that pg_restore was using. This is one of the hard-to-fix consequences of the decision to band-aid over CVE-2018-1058 by having pg_restore run with a minimal search_path. pg_dump can't forestall the problem by schema-qualifying the operator name, because there is no explicit operator name in IS DISTINCT FROM. I complained at the time that there needed to be a way to relax the restriction, but I lost the argument. AFAIK the only workaround that exists at the moment is to hand-edit the dump script to change the forced search_path setting to include whereever you put hstore (and any other extensions you have similar issues with). There's a previous discussion here: https://www.postgresql.org/message-id/flat/ffefc172-a487-aa87-a0e7-472bf29= 735c8%40gmail.com but it seems like nobody's done any work on it since then. regards, tom lane