Re: pg_upgrade ability to create extension from scripts - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: pg_upgrade ability to create extension from scripts
Date
Msg-id 6a881c50-8750-4403-8bbf-6a1f86ddca17@proxel.se
Whole thread Raw
In response to pg_upgrade ability to create extension from scripts  ("Regina Obe" <lr@pcorp.us>)
List pgsql-hackers
On 5/17/25 12:18 AM, Regina Obe wrote:
> It's my understanding that right now when you run pg_upgrade it creates the
> extension from what exists in the to be upgraded databases.
> 
> Is there a reason why we can't have some sort of switch option that allows
> the CREATE EXTENSION from the scripts instead of what is loaded in the db.

We could in theory have such a switch but I am not a fan of the idea 
since objects in the database can depend on objects in the extension, 
objects which might not exist in the newer version of the extension 
making the dump impossible to load.

We would also lose other things such as permissions on the extension 
objects, but that might be something the users are willing to accept.

If we are doing something like this I would rather have a switch for 
attempting to upgrade all extension to the latest version after upgrade 
and let the users get the potential errors there.

Andreas




pgsql-hackers by date:

Previous
From: Sami Imseih
Date:
Subject: Re: Possible regression in PG18 beta1
Next
From: Sadeq Dousti
Date:
Subject: Re: Possible regression in PG18 beta1