Re: Upgrading an extension's extnamespace from user-specified to a defined schema breaks dump/restore - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Upgrading an extension's extnamespace from user-specified to a defined schema breaks dump/restore
Date
Msg-id 950007.1715212519@sss.pgh.pa.us
Whole thread Raw
In response to Re: Upgrading an extension's extnamespace from user-specified to a defined schema breaks dump/restore  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Upgrading an extension's extnamespace from user-specified to a defined schema breaks dump/restore
List pgsql-bugs
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> Let me simplify this a bit.  But the parameter "relocatable" has nothing to
> do with this, "schema" does.

> ===========================
>> cat testext.control
> comment = 'testing extension'
> default_version = '1.0'
> relocatable = false
> trusted = false

>> cat testext--1.1.control
> schema=pg_control

So the actual situation with pg_cron is that they've *never* been
relocatable, but now they want to bind a particular schema where
before they let the user choose?

I absolutely won't accept a suggestion that we should allow ALTER
SET SCHEMA if the extension is saying it's not relocatable.
Potentially breaking other non-relocatable extensions is not
an okay tradeoff for coping with an extremely questionable
decision on pg_cron's part.

I'm also not really inclined to assume that even if we let
SET SCHEMA happen, it would successfully move such an extension.
I think a reasonable penalty on pg_cron for this is that they
should have to supply an extension upgrade script that does
per-object ALTER XXX SET SCHEMA to get everything (or at least
as much as they want) into the newly selected schema.

I do see a missing bit, which is that if the new control
file says schema = whatever, we should probably update
extnamespace to match --- which I guess was your point
as well.  But I don't want to take responsibility for
making the member objects match that.

            regards, tom lane



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Upgrading an extension's extnamespace from user-specified to a defined schema breaks dump/restore
Next
From: "David G. Johnston"
Date:
Subject: Re: Upgrading an extension's extnamespace from user-specified to a defined schema breaks dump/restore