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 1lO2jp-0002ap-6M for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Mar 2021 18:23:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lO2jo-0002P3-3Y for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Mar 2021 18:23:44 +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 1lO2jn-0002O7-T5 for pgsql-hackers@lists.postgresql.org; Sun, 21 Mar 2021 18:23:43 +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 1lO2jl-0004MZ-U7 for pgsql-hackers@postgresql.org; Sun, 21 Mar 2021 18:23:43 +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 12LINcGI388156; Sun, 21 Mar 2021 14:23:38 -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 In-reply-to: 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> <384713.1616345832@sss.pgh.pa.us> <2284b71d-af55-2625-f8c2-cedf1f1a70ca@wi3ck.info> Comments: In-reply-to Jan Wieck message dated "Sun, 21 Mar 2021 13:50:45 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <388154.1616351018.1@sss.pgh.pa.us> Date: Sun, 21 Mar 2021 14:23:38 -0400 Message-ID: <388155.1616351018@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/21/21 12:57 PM, Tom Lane wrote: >>> 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. > Thanks for that. I like this patch a lot better. Needs a little more work than that --- we should allow it to respond to the --no-owner switch, for example. But I think likely we can do it where other object ownership is handled. I'll look in a bit. regards, tom lane