From: Tom Lane <tgl@sss.pgh.pa.us>
To: justusgraf@gmx.de
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15685: pg_upgrade fails to migrate DEFAULT values that use custom TYPEs or FUNCTIONs
Date: Mon, 11 Mar 2019 11:48:55 -0400
Message-ID: <447.1552319335@sss.pgh.pa.us> (raw)
In-Reply-To: <15685-5eb648134f5ec0b7@postgresql.org>
References: <15685-5eb648134f5ec0b7@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> we've recently migrated from PostgreSQL 9.5 to 11.2 and after pg_upgrade a
> couple of tables were in a "broken" state afterwards where they were lacking
> DEFAULT values that relied on custom TYPEs or FUNCTIONs so that after the
> upgrade, we needed to run migrations such as
> ALTER TABLE IF EXISTS table1
> ALTER COLUMN column1 SET DEFAULT unix_timestamp()
> ALTER TABLE IF EXISTS table2
> ALTER COLUMN column2 SET DEFAULT 'open'::recruitment_state
It's hard to say anything definitive without a lot more detail, but
my guess is that this was triggered by the recent security-related
changes to make pg_dump scripts run with restrictive search_path
settings. Probably what happened is that the custom objects you
were relying on contain non-schema-qualified references that fail
with a restrictive search_path, so that they didn't restore into
the new database. It's unclear though why that wouldn't have led
to pg_upgrade failing altogether.
regards, tom lane
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, justusgraf@gmx.de
Subject: Re: BUG #15685: pg_upgrade fails to migrate DEFAULT values that use custom TYPEs or FUNCTIONs
In-Reply-To: <447.1552319335@sss.pgh.pa.us>
References: <15685-5eb648134f5ec0b7@postgresql.org> <447.1552319335@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