Re: pg_upgrade check for invalid databases

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Thomas Krennwallner <tk(at)postsubmeta(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_upgrade check for invalid databases
Date: 2024-09-30 14:12:41
Message-ID: Zvqx2Xs4RUdByT8S@nathan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2024-09-30 14:13:55 Re: ACL_MAINTAIN, Lack of comment content
Previous Message Tom Lane 2024-09-30 14:08:19 Re: msys inet_pton strangeness