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.96) (envelope-from ) id 1vzX5t-0015k1-2F for pgsql-bugs@arkaria.postgresql.org; Mon, 09 Mar 2026 09:40:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vzX5r-00FIZc-0j for pgsql-bugs@arkaria.postgresql.org; Mon, 09 Mar 2026 09:40:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vzX5q-00FIZT-2f for pgsql-bugs@lists.postgresql.org; Mon, 09 Mar 2026 09:40:07 +0000 Received: from sender-pp-e102.zoho.in ([103.117.158.102]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vzX5n-00000001GMS-2hpb for pgsql-bugs@lists.postgresql.org; Mon, 09 Mar 2026 09:40:05 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1773049195; cv=none; d=zohomail.in; s=zohoarc; b=INsErcbh0h0z/n2/fvhdUpZRCWlcMBEpl33B7QC5XXA6THm32ljqe82W5LNvEu492FQ3cowawsFUSJkKI4adlxilShjZ/J9s8ZW7D1dL70bXUEXRzf23gMUXbrgKuC1oJpWVgtVBR3bTGc12MjYtKBGParfjm2zBBozxA34MgQM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.in; s=zohoarc; t=1773049195; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=q/qvQtQL4jtWV3epYLjuzh46eUT2gRbipeQe1pjKD+k=; b=an/1GaBNQtnNxUat185rpWv37mmGZe2MP2QsvZruuwZLNSy2qKoUWuZMMavgGYbzcHxuisNw99ttB5+C/9SqgW0jBaoGvFObTFex3xr5FqJXEwaXHHm/nCD4rUMcgEoifvk2WcTQ7FWgvKZ/vh7grewkq0AtLnJ8BDBpG7V+gjE= ARC-Authentication-Results: i=1; mx.zohomail.in; dkim=pass header.i=zohocorp.com; spf=pass smtp.mailfrom=vishal.g@zohocorp.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773049195; s=admin1; d=zohocorp.com; i=vishal.g@zohocorp.com; h=Date:Date:From:From:To:To:Cc:Cc:Message-ID:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=q/qvQtQL4jtWV3epYLjuzh46eUT2gRbipeQe1pjKD+k=; b=BP0siC10WVTPgTMGIxxVbD5mhhJ4/YMg+qS7zw8+d+i8JTvS0A+OnAqcd6U80HEC +VIW7lR/Y9/TID4575Qiz8Kkm9VpeJDUvtqovpBTtZzExyCnd4mtmU16S6QTyt4lvvV y6i6Pd/vLw5+0eR2SYdVT1HnTZ6ar/Voqg8kc/nQ= Received: from mail.zoho.com by mx.zoho.in with SMTP id 1773049192894768.8650180701354; Mon, 9 Mar 2026 15:09:52 +0530 (IST) Received: from mail.zoho.in by mx.zoho.in with SMTP id 1773049192004826.9955076828318; Mon, 9 Mar 2026 15:09:52 +0530 (IST) Date: Mon, 09 Mar 2026 15:09:51 +0530 From: Vishal Prasanna To: "Hayato Kuroda (Fujitsu)" Cc: =?UTF-8?Q?=22=27=C3=81lvaro_Herrera=27=22?= , "pgsql-bugs" Message-ID: <19cd1f79e36.6f207bc310439.5806765603673787544@zohocorp.com> In-Reply-To: References: <19c95a57600.599bb79483132.9142801067257165882@zohocorp.com> <202602251653.e66kyhiyntlm@alvherre.pgsql> <19c988c1266.2196acf489066.5725883611676009019@zohocorp.com> <19ccf4ccdb3.2e31ab735232.2694179375476897261@zohocorp.com> Subject: RE: [BUG] Assert failure in ReorderBufferReturnTXN during logical decoding due to leaked specinsert change MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Hayato, > ``` > @@ -2663,6 +2655,13 @@ ReorderBufferProcessTXN(ReorderBuffer *rb, ReorderBufferTXN *txn, > if (using_subtxn) > RollbackAndReleaseCurrentSubTransaction(); > > + /* Free the specinsert change before freeing the ReorderBufferTXN */ > + if (specinsert != NULL) > + { > + ReorderBufferReturnChange(rb, specinsert, true); > + specinsert = NULL; > + } > ``` > > In PG17-, we seem to use the term "return" to deallocate the change. Should we follow that? > I have no strong opinion for it. Internally, `ReorderBufferReturnChange()` frees the change, which is why comment uses "Free". Either term is fine for me. Thanks for the review and for registering the patch. Regards, Vishal Prasanna Zoho Corporation