| From: | Vishal Prasanna <vishal(dot)g(at)zohocorp(dot)com> |
|---|---|
| To: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
| Cc: | "'Álvaro Herrera'" <alvherre(at)kurilemu(dot)de>, "pgsql-bugs" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
| Subject: | RE: [BUG] Assert failure in ReorderBufferReturnTXN during logical decoding due to leaked specinsert change |
| Date: | 2026-03-09 09:39:51 |
| Message-ID: | 19cd1f79e36.6f207bc310439.5806765603673787544@zohocorp.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Rafia Sabih | 2026-03-09 13:57:07 | Re: Two issues with REFRESH MATERIALIZED VIEW CONCURRENTLY |
| Previous Message | Michael Paquier | 2026-03-09 07:31:37 | Re: BUG #18943: Return value of a function 'xmlBufferCreate' isdereferenced at xpath.c:177 without checking for NUL |