| From: | "Euler Taveira" <euler(at)eulerto(dot)com> |
|---|---|
| To: | "Nathan Bossart" <nathandbossart(at)gmail(dot)com>, "Bharath Rupireddy" <bharath(dot)rupireddyforpostgres(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-09-22 20:51:44 |
| Message-ID: | 789c00ee-9598-4372-9e0d-7c5275995d70@app.fastmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Sep 22, 2026, at 1:25 PM, Nathan Bossart wrote:
> On Tue, Sep 22, 2026 at 09:10:44AM -0700, Bharath Rupireddy wrote:
>> Even if core drops them automatically, having pg_upgrade deal with
>> them is useful on its own IMHO, since the upgrade could start before
>> that happens. So, I prefer pg_upgrade skipping them without any
>> option, emitting info about the skipped ones, which will not happen
>> often in practice once core handles the drop.
>
> Yeah, I think we should do both. Automatic deletion is probably the best
> thing to do to handle leftover invalid databases, but as you say we can't
> rely on that happening before someone upgrades.
>
... or add a detailed error message to pg_upgrade saying that autovacuum or a
custom worker will remove the invalid databases in the next round. I don't like
the idea of having duplicate functionality. You might have to deal with a race
condition if pg_upgrade and autovacuum decide to act at the same time.
--
Euler Taveira
EDB https://www.enterprisedb.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jacob Champion | 2026-09-22 20:56:35 | Re: [PATCH] Explain what the default output_plugin_libraries do |
| Previous Message | Vadim Ponomarev | 2026-09-22 20:36:59 | Re: Reduce SyncRepLock contention on the commit path |