Re: SSI: ON CONFLICT DO SELECT takes no predicate lock on the returned row - Mailing list pgsql-hackers

From David Christensen
Subject Re: SSI: ON CONFLICT DO SELECT takes no predicate lock on the returned row
Date
Msg-id CAHM0NXhZH_b4qxxfNWYM-ButOcKfLkOOq7HhBYGUHxxiY0AS4w@mail.gmail.com
Whole thread
In response to Re: SSI: ON CONFLICT DO SELECT takes no predicate lock on the returned row  (Zsolt Parragi <zsolt.parragi@percona.com>)
List pgsql-hackers
On Thu, Oct 1, 2026 at 10:26 AM Zsolt Parragi <zsolt.parragi@percona.com> wrote:
> But regardless to this, CreateExecutorState documents on all branches
> that callers are expected to set es_snapshot:
>
>         /*
>          * Initialize all fields of the Executor State structure
>          */
>         estate->es_direction = ForwardScanDirection;
>         estate->es_snapshot = InvalidSnapshot;  /* caller must initialize this */
>         estate->es_crosscheck_snapshot = InvalidSnapshot;       /* no crosscheck */
>
> So I think it would be good practice to set it, independently to this bug.

Agreed, thanks for finding this; the PR for this issue is in flight.

David



pgsql-hackers by date:

Previous
From: Zsolt Parragi
Date:
Subject: Re: SSI: ON CONFLICT DO SELECT takes no predicate lock on the returned row
Next
From: Junwang Zhao
Date:
Subject: Re: CREATE TABLE .. LIKE copies comments to an unrelated table