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 1nh0nn-0007SP-2y for pgsql-general@arkaria.postgresql.org; Wed, 20 Apr 2022 03:14:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nh0nl-0004qr-84 for pgsql-general@arkaria.postgresql.org; Wed, 20 Apr 2022 03:14:45 +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 1nh0nk-0004qi-SU for pgsql-general@lists.postgresql.org; Wed, 20 Apr 2022 03:14:44 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nh0ni-0004yt-Rb for pgsql-general@lists.postgresql.org; Wed, 20 Apr 2022 03:14:44 +0000 Received: by mail-pj1-x1032.google.com with SMTP id o5-20020a17090ad20500b001ca8a1dc47aso3762453pju.1 for ; Tue, 19 Apr 2022 20:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=SI9xIypukhjoWVdXCF/0lj4bZt35Up5+jX8eaFtXZXw=; b=T0/vZqRj/OiWLguk7BSF8Gfsz+gpVVGO7fdeElqKXfdahGDg4KxUIJbOl4tbjpT4Bn Im/LzOUzpF6Y+jxemRdXHzpTDBx5rcHkwv2bv2dTfkjvV6cVaqTuwz9Dz5v7nQ3uMg8f 0n4rPOh86/9Id1QO+Nal5+FXCRyNBOly3D4NoIIO3DzG6nZoSsk551lUfYuemC3cydFd sKg6cDlM2ZjBctPIzaRj8Dvr/Qyl/dhhjsFkcAnPcFCZ/44DpVXV2oeOQaZyTWAA9r9z BpRXd39WQIDmf5pG4M4O6hLgAg3o7Oojfo8B2RtTWd+NTcJd7TVPWNkmEYgPWPS4wO7I 8DKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=SI9xIypukhjoWVdXCF/0lj4bZt35Up5+jX8eaFtXZXw=; b=m5ZLBJMAGWNST9zXvmF+UEBO+yBd4bFFpEFt6t/oqilOuBWGD6OKNfw7jLKGhN103l H4B19+UsrRjQ9eZFKedkhlCfzzizSJEH9T3iKZYWrKD1WT8HVIcAy9Io16dFTTks19a9 Etr5nyGt2q630JBf3BVxzT0FDFj4rwSQmphWO+HNEr9KYNe2SeAyJlmQA8Cd1AbPub13 eP8q5KOdW+Io1HCC5kadvc14BMKp4+qcEfgGIG4bPptp3Yf2lPk5LfE/UNBKwjSwB/gd Iu2JloztAOHwTXsudKU8Wn163z3LwArcJfzMjT/afkdVXYD+OEE7a9jPEDPUxlGKJInN 7Ttw== X-Gm-Message-State: AOAM530YHSiGo4qXANXISxQqzRvx+RkDX8Sd95fiUkEDXhSv+B3WX+gA PGa5Tk5OeyzAktttGapvuPc= X-Google-Smtp-Source: ABdhPJxwbMrxd0K93RLX+eC92jRlm2wx9HScKsvXJLO8RvWC0WJbCuTPBM0TPAgazC+NepY94jTe3A== X-Received: by 2002:a17:90a:b307:b0:1bd:37f3:f0fc with SMTP id d7-20020a17090ab30700b001bd37f3f0fcmr2011399pjr.132.1650424479684; Tue, 19 Apr 2022 20:14:39 -0700 (PDT) Received: from jrouhaud (2001-b011-1005-fd0b-6d68-0208-e235-7ce3.dynamic-ip6.hinet.net. [2001:b011:1005:fd0b:6d68:208:e235:7ce3]) by smtp.gmail.com with ESMTPSA id j3-20020a17090a3e0300b001cb68d28544sm21651919pjc.37.2022.04.19.20.14.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 20:14:39 -0700 (PDT) Date: Wed, 20 Apr 2022 11:14:31 +0800 From: Julien Rouhaud To: Tom Lane Cc: "David G. Johnston" , Bryn Llewellyn , pgsql-general list Subject: Re: Unexpected result from =?utf-8?Q?ALTER?= =?utf-8?B?IEZVTkNUSU9O4oCU?= looks like a bug Message-ID: References: <8AC9A37F-99BD-446F-A2F7-B89AD0022774@yugabyte.com> <20220420024707.zvhpbr5ztermdmm6@jrouhaud> <20220420024903.j25vrhfqtfi6zkzt@jrouhaud> <2713499.1650423990@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2713499.1650423990@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Apr 19, 2022 at 11:06:30PM -0400, Tom Lane wrote: > 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. Yeah I agree. The comment you added seems enough as a future-proof security.