Re: pg_upgrade does not upgrade pg_stat_statements properly - Mailing list pgsql-hackers

From Julien Rouhaud
Subject Re: pg_upgrade does not upgrade pg_stat_statements properly
Date
Msg-id CAOBaU_ZRhXZN9qfWfyO+8pSLX6McFVwLYoDcsMtpvhd0pdiz3g@mail.gmail.com
Whole thread Raw
In response to Re: pg_upgrade does not upgrade pg_stat_statements properly  (Bruce Momjian <bruce@momjian.us>)
Responses Re: pg_upgrade does not upgrade pg_stat_statements properly
List pgsql-hackers
On Fri, Jul 30, 2021 at 12:14 AM Bruce Momjian <bruce@momjian.us> wrote:
>
> On Thu, Jul 29, 2021 at 11:46:12AM -0400, Jan Wieck wrote:
> >
> > This assumes that the scripts executed during CREATE EXTENSION have no
> > conditional code in them that depends on the server version. Running the
> > same SQL script on different server versions can have different effects.
> >
> > I don't have a ready example of such an extension, but if we ever would
> > convert the backend parts of Slony into an extension, it would be one.
>
> The bottom line is that we have _no_ mechanism to handle this except
> uninstalling the extension before the upgrade and re-installing it
> afterward, which isn't clearly spelled out for each extension, as far as
> I know, and would not work for extensions that create data types.
>
> Yes, I do feel this is a big hold in our upgrade instructions.

FWIW I have an example of such an extension: powa-archivist extension
script runs an anonymous block code and creates if needed a custom
wrapper to emulate the current_setting(text, boolean) variant that
doesn't exist on pre-pg96 servers.



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pg_upgrade does not upgrade pg_stat_statements properly
Next
From: Dave Cramer
Date:
Subject: Re: pg_upgrade does not upgrade pg_stat_statements properly