From: | Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> |
---|---|
To: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Options to control remote transactions’ access/deferrable modes in postgres_fdw |
Date: | 2025-03-30 10:14:01 |
Message-ID: | CAPmGK16pn+k0tLNR8NvZdtiADpnjZPYK-HuaxwOmzHzUgTE7_A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Mar 27, 2025 at 1:25 PM Ashutosh Bapat
<ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
> On Tue, Mar 25, 2025 at 4:01 PM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
> > In the patch I also fixed a bug; I trusted XactReadOnly to see if the
> > local transaction is READ ONLY, but I noticed that that is not 100%
> > correct, because a transaction which started as READ WRITE can show as
> > READ ONLY later within subtransactions, so I modified the patch so
> > that postgres_fdw opens remote transactions in READ ONLY mode if the
> > local transaction has been declared READ ONLY at the top level.
>
> Nice catch. postgres_fdw replicates the transaction stack on foreign
> server. I think we need to replicate it along with the transaction
> properties. And also we need a test which tests readonly
> subtransaction behaviour.
Ok, will do.
Thanks for the comment!
Best regards,
Etsuro Fujita
From | Date | Subject | |
---|---|---|---|
Next Message | Etsuro Fujita | 2025-03-30 10:23:29 | Thinko in pgstat_build_snapshot() |
Previous Message | Alexander Lakhin | 2025-03-30 09:00:00 | The 026_overwrite_contrecord test might fail on extremely slow animals |