| From: | David Christensen <david+pg(at)pgguru(dot)net> |
|---|---|
| To: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org, Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
| Subject: | Re: SSI: ON CONFLICT DO SELECT takes no predicate lock on the returned row |
| Date: | 2026-10-01 15:30:52 |
| Message-ID: | CAHM0NXhZH_b4qxxfNWYM-ButOcKfLkOOq7HhBYGUHxxiY0AS4w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Oct 1, 2026 at 10:26 AM Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Junwang Zhao | 2026-10-01 15:31:57 | Re: CREATE TABLE .. LIKE copies comments to an unrelated table |
| Previous Message | Zsolt Parragi | 2026-10-01 15:26:34 | Re: SSI: ON CONFLICT DO SELECT takes no predicate lock on the returned row |