pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Cherio <cherio@gmail.com>
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
Date: Fri, 15 Mar 2019 17:27:59 -0400
Message-ID: <13985.1552685279@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKHqFkL0pYC9Tdk5W-6T0GFz_A2EuqnxwbG3V_WY1kXgj93SFg@mail.gmail.com>
References: <CAKHqFkL0pYC9Tdk5W-6T0GFz_A2EuqnxwbG3V_WY1kXgj93SFg@mail.gmail.com>

Cherio <cherio@gmail.com> 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 does
> not exist: public.hstore = 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-472bf29735c8%40gmail.com

but it seems like nobody's done any work on it since then.

			regards, tom lane




view thread (2+ messages)

Message-ID: <13985.1552685279@sss.pgh.pa.us>
Permalink:  ../13985.1552685279@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13985.1552685279@sss.pgh.pa.us

 · 

reply

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, cherio@gmail.com
  Subject: Re: pg_restore: [archiver (db)] could not execute query: ERROR: operator does not exist: public.hstore = public.hstore
  In-Reply-To: <13985.1552685279@sss.pgh.pa.us>
  References: <CAKHqFkL0pYC9Tdk5W-6T0GFz_A2EuqnxwbG3V_WY1kXgj93SFg@mail.gmail.com> <13985.1552685279@sss.pgh.pa.us>

* 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