Re: Teach pg_upgrade to deal with invalid databases

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Rithvika Devisetti <devisettirithvika(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Robert Treat <rob(at)xzilla(dot)net>
Subject: Re: Teach pg_upgrade to deal with invalid databases
Date: 2026-10-05 00:00:00
Message-ID: CALj2ACX1_7i3UrtjWJvZvX0VxFo6G4V7qHafLOXJo7C+G5ejGw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Fri, Oct 2, 2026 at 9:21 AM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>
> On Thu, Sep 24, 2026 at 08:37:00AM -0700, Bharath Rupireddy wrote:
> > I implemented the above approach, pg_upgrade skipping them without any
> > option and emitting info about the skipped ones. I ensured the CI is
> > happy. Please find the attached v2 patch.
>
> Thanks. IMHO we shouldn't bother adding a note to pg_upgrade's
> documentation, or even emitting warnings when pg_upgrade skips invalid
> databases. For all intents and purposes, the database is already dropped
> (for some definition of "dropped"), and there's nothing actionable for the
> user.

Thanks for looking at it.

Upon thinking more on this, I agree on both. Unless there are
objections, I will drop the warning and the doc note in the next
version.

Once pg_upgrade skips invalid databases, the user has no action to
take. Even if the user reverts to the old cluster, the invalid
databases are still there.

I also think not reporting them matches what other tools do, like
pg_dumpall (dumpDatabases()), vacuumdb (vacuum_all_databases()),
reindexdb (reindex_all_databases()), etc. They skip invalid databases
without emitting any info, and their docs don't mention it either.

--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Manu 2026-10-04 23:42:28 Re: doc: Document Linux cgroup memory limits