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 1nh0fs-00071Z-5T for pgsql-general@arkaria.postgresql.org; Wed, 20 Apr 2022 03:06:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nh0fr-0000Xq-13 for pgsql-general@arkaria.postgresql.org; Wed, 20 Apr 2022 03:06:35 +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 1nh0fq-0000XS-Me for pgsql-general@lists.postgresql.org; Wed, 20 Apr 2022 03:06:34 +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 1nh0fo-0004oU-DK for pgsql-general@lists.postgresql.org; Wed, 20 Apr 2022 03:06:34 +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 23K36U1R2713500; Tue, 19 Apr 2022 23:06:30 -0400 From: Tom Lane To: Julien Rouhaud cc: "David G. Johnston" , Bryn Llewellyn , pgsql-general list Subject: Re: Unexpected result from ALTER =?utf-8?Q?FUNCTION?= =?utf-8?B?4oCU?= looks like a bug In-reply-to: <20220420024903.j25vrhfqtfi6zkzt@jrouhaud> References: <8AC9A37F-99BD-446F-A2F7-B89AD0022774@yugabyte.com> <20220420024707.zvhpbr5ztermdmm6@jrouhaud> <20220420024903.j25vrhfqtfi6zkzt@jrouhaud> Comments: In-reply-to Julien Rouhaud message dated "Wed, 20 Apr 2022 10:49:03 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2713498.1650423990.1@sss.pgh.pa.us> Date: Tue, 19 Apr 2022 23:06:30 -0400 Message-ID: <2713499.1650423990@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Julien Rouhaud writes: > On Wed, Apr 20, 2022 at 10:47:07AM +0800, Julien Rouhaud wrote: >> >> AFAICT the problem is that SET / RESET part is messing with the >> HeapTuple, so you can't use the procForm reference afterwards. Simply >> processing parallel_item before set_items fixes the problem, as in the >> attached. > This time with the file. Yeah, I arrived at the same fix. Another possibility would be to make the procForm pointer valid again after heap_modify_tuple, but that seemed like it'd add more code for no really good reason. regards, tom lane