Re: Should shared_preload_libraries be loaded during binary upgrade? - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Should shared_preload_libraries be loaded during binary upgrade?
Date
Msg-id aBQb288nJVFMoOUX@paquier.xyz
Whole thread Raw
In response to Re: Should shared_preload_libraries be loaded during binary upgrade?  (Nathan Bossart <nathandbossart@gmail.com>)
List pgsql-hackers
On Thu, May 01, 2025 at 09:14:50AM -0500, Nathan Bossart wrote:
> +1, I believe I've seen cases where loading the library was necessary and
> others where it breaks the upgrade.  A one-size-fits-all approach probably
> won't work here.

Yes, it really depends on one's expections.

The area I known about that causes most of the problems depending on
what's loaded by shared_preload_libraries is background workers that
forget to do some check based on IsBinaryUpgrade when these are loaded
in a cluster running during an upgrade.  The most popular extension do
that (example: pg_cron), but perhaps this is mostly a documentation
issue and we ought to do a better job regarding that?

Other example: worker_spi.c does not include such a check, but it
creates tables, and I'm pretty sure that it's common for newcomers to
copy-paste such "template" code from the tree when implementing their
own extensions.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Add an option to skip loading missing publication to avoid logical replication failure
Next
From: jian he
Date:
Subject: doc pg_constraint.convalidated column description need update