Re: pg_upgrade check for invalid databases - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: pg_upgrade check for invalid databases
Date
Msg-id Zvqx2Xs4RUdByT8S@nathan
Whole thread Raw
Responses Re: pg_upgrade check for invalid databases
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: msys inet_pton strangeness
Next
From: Daniel Gustafsson
Date:
Subject: Re: ACL_MAINTAIN, Lack of comment content