Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hi86B-0001Ov-3y for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jul 2019 02:00:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hi868-0001uB-3U for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jul 2019 02:00:44 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hi867-0001u4-Qw for pgsql-hackers@lists.postgresql.org; Tue, 02 Jul 2019 02:00:43 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hi85z-0005Rf-8P for pgsql-hackers@lists.postgresql.org; Tue, 02 Jul 2019 02:00:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x6220TJK001617; Mon, 1 Jul 2019 22:00:29 -0400 From: Tom Lane To: movead li cc: pgsql-hackers@lists.postgresql.org Subject: Re: Rearranging ALTER TABLE to avoid multi-operations bugs In-reply-to: <156041479952.1280.2626916806999463144.pgcf@coridan.postgresql.org> References: <10365.1558909428@sss.pgh.pa.us> <41540.1559168266@sss.pgh.pa.us> <156041479952.1280.2626916806999463144.pgcf@coridan.postgresql.org> Comments: In-reply-to movead li message dated "Thu, 13 Jun 2019 08:33:19 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1615.1562032829.1@sss.pgh.pa.us> Date: Mon, 01 Jul 2019 22:00:29 -0400 Message-ID: <1616.1562032829@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk movead li writes: > I applied the 'alter-table-with-recursive-process-utility-calls-wip.patch' > on the master(e788e849addd56007a0e75f3b5514f294a0f3bca). And > when I test the cases, I find it works well on 'alter table t1 add column > f2 int not null, alter column f2 add generated always as identity' case, > but it doesn't work on #14827, #15180, #15670, #15710. This review seems not very on-point, because I made no claim to have fixed any of those bugs. The issue at the moment is how to structure the code to allow ALTER TABLE to call other utility statements --- or, if we aren't going to do that as Robert seems not to want to, what exactly we're going to do instead. The patch at hand does fix some ALTER TABLE ... IDENTITY bugs, because fixing those doesn't require any conditional execution of utility statements. But we'll need infrastructure for such conditional execution to fix the original bugs. I don't see much point in working on that part until we have some agreement about how to handle what this patch is already doing. regards, tom lane