Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lO1OC-0008Fa-Pg for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Mar 2021 16:57:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lO1OB-0002O0-N7 for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Mar 2021 16:57:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lO1OB-0002Nt-GC for pgsql-hackers@lists.postgresql.org; Sun, 21 Mar 2021 16:57:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lO1O8-0003jD-2L for pgsql-hackers@postgresql.org; Sun, 21 Mar 2021 16:57:19 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 12LGvCLc384714; Sun, 21 Mar 2021 12:57:12 -0400 From: Tom Lane To: Jan Wieck cc: Magnus Hagander , Robins Tharakan , Peter Eisentraut , "pgsql-hackers@postgresql.org" Subject: Re: Fix pg_upgrade to preserve datdba (was: Re: pg_upgrade failing for 200+ million Large Objects) In-reply-to: <0b5d506d-70d2-1506-bbdf-89e6453c0289@wi3ck.info> References: <1742698.1615221182@sss.pgh.pa.us> <1743618.1615222719@sss.pgh.pa.us> <4fbf92f2-ec91-f4fa-a259-f0968e34f3d7@wi3ck.info> <0b5d506d-70d2-1506-bbdf-89e6453c0289@wi3ck.info> Comments: In-reply-to Jan Wieck message dated "Sun, 21 Mar 2021 12:50:46 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <384712.1616345832.1@sss.pgh.pa.us> Date: Sun, 21 Mar 2021 12:57:12 -0400 Message-ID: <384713.1616345832@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Jan Wieck writes: > On 3/20/21 12:39 AM, Jan Wieck wrote: >> On the way pg_upgrade also mangles the pg_database.datdba >> (all databases are owned by postgres after an upgrade; will submit a >> separate patch for that as I consider that a bug by itself). > Patch attached. Hmm, doesn't this lose all *other* database-level properties? I think maybe what we have here is a bug in pg_restore, its --create switch ought to be trying to update the database's ownership. regards, tom lane