On 2023-Jul-05, Michael Paquier wrote: > The same thing as HEAD could be done on its back-branches by removing > --with-openssl and bring more consistency, but pg_upgrade has never > been good at handling upgrades with different library requirements. > Something I am wondering is if AdjustUpgrade.pm could gain more > knowledge in this area, though I am unsure how much could be achieved > as this module has only object-level knowledge.
Hmm, let's explore the AdjustUpgrade.pm path a bit more: 002_pg_upgrade.pl can test for presence or absence of pgcrypto by grepping pg_config --configure for --with-ssl or --with-openssl. If the old cluster has it but the new doesn't, we must drop the contrib_regression_pgcrypto database. I think we would need a new function in AdjustUpgrade.pm (or an API change to adjust_database_contents) so that we can add the DROP DATABASE command conditionally. This seems easily extended to contrib/xml2 also. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "La rebeldía es la virtud original del hombre" (Arthur Schopenhauer)