From: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
---|---|
To: | Etsuro Fujita <efujita(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: postgres_fdw: Inherit the local transaction's access/deferrable |
Date: | 2025-06-02 03:03:50 |
Message-ID: | ed2296f1-1a6b-4932-b870-5bb18c2591ae@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On 2025/06/01 17:34, Etsuro Fujita wrote:
> postgres_fdw: Inherit the local transaction's access/deferrable modes.
>
> Previously, postgres_fdw always 1) opened a remote transaction in READ
> WRITE mode even when the local transaction was READ ONLY, causing a READ
> ONLY transaction using it that references a foreign table mapped to a
> remote view executing a volatile function to write in the remote side,
> and 2) opened the remote transaction in NOT DEFERRABLE mode even when
> the local transaction was DEFERRABLE, causing a SERIALIZABLE READ ONLY
> DEFERRABLE transaction using it to abort due to a serialization failure
> in the remote side.
>
> To avoid these, modify postgres_fdw to open a remote transaction in the
> same access/deferrable modes as the local transaction. This commit also
> modifies it to open a remote subtransaction in the same access mode as
> the local subtransaction.
>
> Although these issues exist since the introduction of postgres_fdw,
> there have been no reports from the field. So it seems fine to just fix
> them in master only.
I'm not sure this change should be considered a bug fix,
since the current behavior of postgres_fdw with a local read-only
transaction isn't clearly documented. Some users might see this
as a behavioral change rather than a fix. Anyway if we go with it,
shouldn't we document the change in the v18 release notes?
Regards,
--
Fujii Masao
NTT DATA Japan Corporation
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2025-06-02 03:04:32 | pgsql: Use replay LSN as target for cascading logical WAL senders |
Previous Message | Tom Lane | 2025-06-01 18:59:09 | pgsql: Add commit 4672b6223 to .git-blame-ignore-revs. |
From | Date | Subject | |
---|---|---|---|
Next Message | jian he | 2025-06-02 03:13:20 | Re: ALTER TABLE ALTER CONSTRAINT misleading error message |
Previous Message | Tom Lane | 2025-06-01 19:05:37 | Re: Confused coding in PLy_traceback() |