public inbox for [email protected]  
help / color / mirror / Atom feed
From: Etsuro Fujita <[email protected]>
To: Fujii Masao <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: Etsuro Fujita <[email protected]>
Cc: [email protected]
Subject: Re: pgsql: postgres_fdw: Inherit the local transaction's access/deferrable
Date: Thu, 5 Mar 2026 09:00:55 +0900
Message-ID: <CAPmGK14xGauyA5XOY1Q3Ou+Ge30xBgDpsMOUw2p7wJYmejEgjA@mail.gmail.com> (raw)
In-Reply-To: <CAPmGK14yYoO2iBg7SoT3WdnAKoCpWy_LPdoTDepJ21-Yf8TiKA@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<CAPmGK17Vf4fWt=+kCZ8V3JP7jO6iMrUze7TjOVtGzZwNbevnwg@mail.gmail.com>
	<[email protected]>
	<CAPmGK14yYoO2iBg7SoT3WdnAKoCpWy_LPdoTDepJ21-Yf8TiKA@mail.gmail.com>

On Sun, Feb 15, 2026 at 5:40 PM Etsuro Fujita <[email protected]> wrote:
> On Wed, Jun 4, 2025 at 1:15 PM Fujii Masao <[email protected]> wrote:
> > I agree this could be considered a fix if the new behavior has been
> > clearly explained in the documentation from before or based on
> > standards like SQL/MED. But if that's not the case, it seems more
> > like a behavior change. In that case, I think it should wait for v19
> > and be applied only after reaching consensus. Some systems might
> > rely on the previous behavior.
> >
> > By the way, if a read-only transaction on the local server is meant
> > to block all write operations on the remote server, this patch alone
> > might not be sufficient, for example, that read-only transaction can
> > invoke a login trigger on the remote server and it could still
> > perform writes.
>
> This patch 1) modifies postgres_fdw so that it opens remote
> transactions in read-only mode if the corresponding local transaction
> is read-only, as noted in the documentation, but 2) keeps the existing
> behavior of login triggers that they can write even if the invoking
> transaction is read-only.  So declaring a transaction as read-only on
> the local side doesn't mean it blocks all write operations on the
> remote side; it still allows login triggers invoked on the remote side
> to write.  Considering typical use-cases of such triggers, this seems
> reasonable to me.  I think it might be a good idea to add a note about
> it to the documentation, though.
>
> I'd like to re-propose this patch for v19, as mentioned in this thread.

I posted a new version of the patch to the -hackers mailing list [1],
which includes the note mentioned above.  It would be great if I got
feedback from you.

Best regards,
Etsuro Fujita

[1] https://www.postgresql.org/message-id/CAPmGK14ZTHRGPprEhzEe2TJxaCcjNVeWw6tue_gqp%3D9DzqYnMA%40mail.g...





view thread (12+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: pgsql: postgres_fdw: Inherit the local transaction's access/deferrable
  In-Reply-To: <CAPmGK14xGauyA5XOY1Q3Ou+Ge30xBgDpsMOUw2p7wJYmejEgjA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox