Re: Use-after-free in reorderbuffer.c for INSERT ON CONFLICT

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Postgres bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Ethan Mertz <ethan(dot)mertz(at)gmail(dot)com>
Subject: Re: Use-after-free in reorderbuffer.c for INSERT ON CONFLICT
Date: 2025-08-01 04:52:20
Message-ID: aIxIBL61XtPxXJVV@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Aug 01, 2025 at 10:03:14AM +0530, Amit Kapila wrote:
> We still won't be able to capture the latest LSN in case of
> REORDER_BUFFER_CHANGE_INTERNAL_SPEC_ABORT. IIRC, update_progress_txn
> is used to keep the client active so that when many changes are
> skipped, the client doesn't timeout. In this case, it seems okay to
> use prev_lsn as well.

I am not quite sure to follow your argument here. In the case of a
REORDER_BUFFER_CHANGE_INTERNAL_SPEC_ABORT change, we would use
change->lsn, which is in the case of the patch and HEAD the same
thing: prev_lsn. So the logic is unchanged in the case, isn't it?
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2025-08-01 04:53:23 Re: BUG #19000: gist index returns inconsistent result with gist_inet_ops
Previous Message Tender Wang 2025-08-01 04:38:00 Re: BUG #19000: gist index returns inconsistent result with gist_inet_ops