Re: postgres_fdw: transaction mode inheritance corner cases - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Re: postgres_fdw: transaction mode inheritance corner cases
Date
Msg-id CAPmGK14s4dS5FYr96vkK_Ti-sVFi8c0V5_kmDPv7mEQbEXEMvg@mail.gmail.com
Whole thread
In response to Re: postgres_fdw: transaction mode inheritance corner cases  (Nikolay Samokhvalov <nik@postgres.ai>)
Responses Re: postgres_fdw: transaction mode inheritance corner cases
List pgsql-hackers
On Fri, Oct 2, 2026 at 1:47 AM Nikolay Samokhvalov <nik@postgres.ai> wrote:
> On Wed, Sep 30, 2026 at 11:27 AM Matheus Alcantara
> <matheusssilv97@gmail.com> wrote:
> > With the patch, the new begin_remote_xact() call in create_cursor opens a
> > remote SAVEPOINT s2 and creates the cursor inside it. ROLLBACK TO s1 then
> > destroys the remote cursor while the local side still thinks it exists.
>
> Thanks, Matheus. My AI harness for testing reproduced this on
> REL_19_STABLE at 9e73b209 with Etsuro's v1 patch and prepared the
> attached incremental patch. It declares the remote cursor before
> advancing the remote savepoint level, then synchronizes the transaction
> mode before FETCH. The second FETCH fails with 34000 on v1 and succeeds
> with this patch.

Will look into the patch.  Thanks!

Best regards,
Etsuro Fujita



pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: postgres_fdw: transaction mode inheritance corner cases
Next
From: Etsuro Fujita
Date:
Subject: Re: postgres_fdw: transaction mode inheritance corner cases