Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rfSng-000IQn-MF for pgsql-bugs@arkaria.postgresql.org; Wed, 28 Feb 2024 22:53:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rfSnd-00Fq6J-Tr for pgsql-bugs@arkaria.postgresql.org; Wed, 28 Feb 2024 22:53:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rfSnd-00Fq6B-Lc for pgsql-bugs@lists.postgresql.org; Wed, 28 Feb 2024 22:53:18 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rfSnZ-001tHu-R2 for pgsql-bugs@lists.postgresql.org; Wed, 28 Feb 2024 22:53:17 +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 41SMrCQM2572129; Wed, 28 Feb 2024 17:53:12 -0500 From: Tom Lane To: Andrew Dunstan cc: Jim Wilson , pgsql-bugs@lists.postgresql.org Subject: Re: Feature bug dumpall CREATE ROLE postgres In-reply-to: <4f7760bd-243b-6eb1-4c4d-de07200012f9@dunslane.net> References: <2149099.1709064762@sss.pgh.pa.us> <8663cc11-4a1c-68fa-d950-fdc863f28f4b@dunslane.net> <2549130.1709159773@sss.pgh.pa.us> <4f7760bd-243b-6eb1-4c4d-de07200012f9@dunslane.net> Comments: In-reply-to Andrew Dunstan message dated "Wed, 28 Feb 2024 17:47:22 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2572127.1709160792.1@sss.pgh.pa.us> Date: Wed, 28 Feb 2024 17:53:12 -0500 Message-ID: <2572128.1709160792@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrew Dunstan writes: > On 2024-02-28 We 17:36, Tom Lane wrote: >> Hmm ... pg_dump has never used any DO blocks in its output, and >> I'm not sure it's a great idea to start. Seems like the kind of >> decision we could regret down the road, given the possible need >> for pg_restore to parse the output. > This is only for pg_dumpall. pg_restore shouldn't care. Yeah, fair point. I've long thought that we should get pg_dumpall to emit something more structured than "big SQL script", but I'm not holding my breath for that to happen. Still, I'm a bit leery of the idea. Isn't plpgsql supposed to be optional/droppable? I guess we could tell people who don't want it that they can't drop it until after restoring their old data, but still ... regards, tom lane