From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: IVAN HUMANES CABANAS (Fujitsu) <ivan.humanescabanas@fujitsu.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: Error pg_upgrade version 11 to 15
Date: Mon, 18 Aug 2025 16:53:50 -0500
Message-ID: <aKOg7rIY3G94asHn@nathan> (raw)
In-Reply-To: <454618.1755548336@sss.pgh.pa.us>
References: <AMBP191MB2746B1A4B24D87330C7A028DFD31A@AMBP191MB2746.EURP191.PROD.OUTLOOK.COM>
<417487.1755533405@sss.pgh.pa.us>
<6545b4ca-a685-4a30-8aec-451dcb891d0b@dunslane.net>
<aKOH5RSGXz0DcU7l@nathan>
<454618.1755548336@sss.pgh.pa.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: nathandbossart@gmail.com, tgl@sss.pgh.pa.us, andrew@dunslane.net, ivan.humanescabanas@fujitsu.com
Subject: Re: Error pg_upgrade version 11 to 15
In-Reply-To: <aKOg7rIY3G94asHn@nathan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox