Re: Error pg_upgrade version 11 to 15 - Mailing list pgsql-bugs

From Nathan Bossart
Subject Re: Error pg_upgrade version 11 to 15
Date
Msg-id aKOg7rIY3G94asHn@nathan
Whole thread Raw
In response to Re: Error pg_upgrade version 11 to 15  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Mon, Aug 18, 2025 at 04:18:56PM -0400, Tom Lane wrote:
> Yeah.  The logic about this is in pg_dump, actually: dumpDatabase()
> decides whether or not to add "UPDATE ... SET datistemplate = false"
> to the delQry.  I was thinking about having it do that either if
> the source DB has datistemplate or if its name is template1.
> That would cover both (1) restoring a nonstandard set of databases
> into the original installation with --clean, and (2) restoring a
> nonstandard setup into a pristine installation.  I don't think we
> need to account for template0 because neither pg_dumpall nor
> pg_upgrade will attempt to replace it.
> 
> However, first I'd like confirmation that this theory explains
> the OP's problem.

WFM, provided your theory is correct.

-- 
nathan



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Error pg_upgrade version 11 to 15
Next
From: Michael Paquier
Date:
Subject: Re: TRAP: failed Assert("outerPlan != NULL") in postgres_fdw.c