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

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, pgsql-hackers mailing list <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Nathan Bossart <nathandbossart(at)gmail(dot)com>
Subject: Re: SSI: ON CONFLICT DO SELECT takes no predicate lock on the returned row
Date: 2026-09-22 22:18:08
Message-ID: CAN4CZFPz4ysPyo1ahD-5n0iyKxmuo2Wvn=PgEZTyW63_Tu7Eaw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Unfortunately I realized a bit late that v4 can cause a logical
replication crash because the apply worker doesn't have es_snapshot
set. This seems to be an oversight as CreateExecutorState documents
that the caller has to initialize es_snapshot, but
create_edata_for_relation never does so in worker.c

The attached patch sets it and adds a simple test case that shows the problem.

Attachment Content-Type Size
0001-Fix-crash-in-logical-replication-apply-worker-at-SER.patch application/octet-stream 4.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2026-09-22 22:35:00 Re: Support for 8-byte TOAST values, round two
Previous Message Devrim Gündüz 2026-09-22 22:05:12 [PATCH] Misleading error message for REPACK USING INDEX on shared catalogs