Re: SSI: ON CONFLICT DO SELECT takes no predicate lock on the returned row

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers mailing list <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: SSI: ON CONFLICT DO SELECT takes no predicate lock on the returned row
Date: 2026-09-25 09:25:22
Message-ID: A4D67537-D09B-4C67-A03C-4A59F7C5C238@yandex-team.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Dean,

On 23 Sep 2026, Dean Rasheed wrote:
> Grepping on PGXN, I see no use of ExecCheckIndexConstraints(), so it's
> probably your fix is OK.

I found a caller in pg_lake [0] that creates its own EState without
setting es_snapshot. It pushes an active snapshot, but passes the
unchanged EState to ExecCheckIndexConstraints(). Your proposed
InvalidSnapshot guard would cover this too.

Thank you!

Best regards, Andrey Borodin.

[0] https://github.com/Snowflake-Labs/pg_lake/blob/44befc068dda9346bca2b0982929d99508d43fdf/pg_lake_table/src/fdw/update_tracking.c#L105-L284

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2026-09-25 09:28:03 Re: Fix "unexpected logical decoding status change" error; from concurrent logical decoding activation
Previous Message Nikhil Kumar Veldanda 2026-09-25 09:21:11 Re: ZSTD TOAST compression, and an extensible compression method encoding