On Fri, Jul 30, 2021 at 12:14 AM Bruce Momjian <br...@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.