| From: | Robert Treat <rob(at)xzilla(dot)net> |
|---|---|
| To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
| Cc: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Rithvika Devisetti <devisettirithvika(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Teach pg_upgrade to deal with invalid databases |
| Date: | 2026-09-22 14:15:56 |
| Message-ID: | CAJSLCQ2g6Ai7cDzobN3Z-komyBaAmV-1pbME-Th0M7JUTSnpKQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Sep 21, 2026 at 3:01 PM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>
> On Tue, Sep 08, 2026 at 10:11:23AM -0700, Bharath Rupireddy wrote:
> > pg_upgrade skipping the invalid databases seems like the right
> > approach. Whether or not this has to be put behind an option and
> > retain the current error behavior is something we need to agree on. I
> > still think pg_upgrade can just skip and the error could be removed,
> > unless anyone thinks otherwise.
>
> I think we ought to simply skip the invalid databases without any sort of
> option. The only counterargument I'm aware of is that someone might want
> to try recoving the database, but AFAIK there's no supported recovery
> mechanism. Even if there was, it seems pretty unlikely that a user would
> cancel an errant DROP DATABASE and then proceed to run pg_upgrade before
> attempting recovery. Furthermore, I believe the proposed skipping behavior
> more closely matches the previous behavior before we started using
> datconnlimit == -2 to mean the database is invalid.
>
+1 from me; If people are really concerned, I think it'd be enough to
just be a little more chatty about it in the logs; ie. add some
warnings and/or notes when we find/skip an invalid database to the
various logs and instructions during the upgrade process.
Robert Treat
https://xzilla.net
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeevan Chalke | 2026-09-22 14:18:49 | Re: Add PRODUCT() aggregate function |
| Previous Message | ZizhuanLiu X-MAN | 2026-09-22 14:11:49 | Re: Optimize MCV stats for sortable types and utilize sorted-order properties |