On Sun, May 4, 2025 at 9:30 PM Etsuro Fujita <etsuro.fuj...@gmail.com> wrote: > As read-only > subtransactions can’t change to read-write, and a read-only > main-transaction can’t change to read-write after first snapshot, > either (note: begin_remote_xact is called after it), all we need to do > is track the nesting level of the outermost read-only transaction in > the local transaction and control the access mode of remote > transactions based on it so that they have the same access mode as the > local transaction at each subtransaction level, like the attached.
I noticed that an assertion I added to pgfdw_subxact_callback fails when running some transactions. To fix, I just removed the assertion. Attached is an updated version of the patch. I also added a test case that was causing the failure, and tweaked some comments/docs a little bit. Best regards, Etsuro Fujita
Inherit-xact-properties-in-postgres-fdw-v4.patch
Description: Binary data