I wrote:
> So it doesn't seem that we've broken anything since 9.5 --- it didn't
> work before either. The seeming successes may have been due to chance,
> i.e. pg_upgrade probing the libraries in an order that happened to work.
> I see no evidence that get_loadable_libraries/check_loadable_libraries
> are paying any attention to what order the libraries are checked in.
It occurs to me that a back-patchable workaround for this would be to
make get_loadable_libraries sort the library names in order by length
(and I guess we might as well sort same-length names alphabetically).
This would for example guarantee that hstore_plpython is probed after
both hstore and plpython. Admittedly, this is a kluge of the first
water. But I see no prospect of back-patching any real fix, and it
would definitely be better if pg_upgrade didn't fail on these modules.
regards, tom lane