On Sun, Sep 29, 2024 at 08:45:50PM -0400, Thomas Krennwallner wrote: > if a cluster contains invalid databases that we cannot connect to anymore, > pg_upgrade would currently fail when trying to connect to the first > encountered invalid database with > > [...] > > If there is more than one invalid database, we need to run pg_upgrade more > than once (unless the user inspects pg_database). > > I attached two small patches for PG 17 and PG 18 (can be easily backported > to all previous versions upon request). Instead of just failing to connect > with an error, we collect all invalid databases in a report file > invalid_databases.txt:
Should we have pg_upgrade skip invalid databases? If the only valid action is to drop them, IMHO it seems unnecessary to require users to manually drop them before retrying pg_upgrade. -- nathan