Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frkKn-0007UU-AV for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Aug 2018 13:35:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1frkKl-0006mH-Hv for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Aug 2018 13:35:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frkKl-0006mA-B9 for pgsql-hackers@lists.postgresql.org; Mon, 20 Aug 2018 13:35:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frkKe-0003YA-I6 for pgsql-hackers@postgresql.org; Mon, 20 Aug 2018 13:35:02 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w7KDYojG001691; Mon, 20 Aug 2018 09:34:51 -0400 From: Tom Lane To: Andres Freund cc: Peter Eisentraut , Michael Paquier , pgsql-hackers Subject: Re: ALTER TABLE on system catalogs In-reply-to: <20180820125022.kh37mj7sxtaxeize@alap3.anarazel.de> References: <20180627203733.bfpibxdleimvwdg2@alap3.anarazel.de> <20180627230838.GI2667@paquier.xyz> <9fb22a98-fd64-1426-a4f4-b927ce1a9a5e@2ndquadrant.com> <920b7cde-6926-4ad3-936b-7637f0a8188f@2ndquadrant.com> <20180820023749.GD7403@paquier.xyz> <20180820104825.a7yryvlycwimgttf@alap3.anarazel.de> <20180820125022.kh37mj7sxtaxeize@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 20 Aug 2018 05:50:22 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19364.1534772090.1@sss.pgh.pa.us> Date: Mon, 20 Aug 2018 09:34:50 -0400 Message-ID: <19365.1534772090@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2018-08-20 14:38:25 +0200, Peter Eisentraut wrote: >> Do you have an alternative in mind? > One is to just not do anything. I'm not sure I'm on board with the goal > of changing things to make DDL on system tables more palatable. FWIW, I agree with doing as little as possible here. I'd be on board with Andres' suggestion of just swapping the two code stanzas so that the no-op case doesn't error out. As soon as you go beyond that, you are in wildly unsafe and untested territory. regards, tom lane