public inbox for [email protected]  
help / color / mirror / Atom feed
From: Fujii Masao <[email protected]>
To: Etsuro Fujita <[email protected]>
Cc: Ashutosh Bapat <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject:  Re: Options to control remote transactions’ access/deferrable modes in postgres_fdw
Date: Thu, 5 Mar 2026 12:10:50 +0900
Message-ID: <CAHGQGwHjeZNppb4N7oG4vdPT1i2RY+=YRA=NUwhwYgpsjRyxfA@mail.gmail.com> (raw)
In-Reply-To: <CAPmGK14ZTHRGPprEhzEe2TJxaCcjNVeWw6tue_gqp=9DzqYnMA@mail.gmail.com>
References: <CAPmGK16n_hcUUWuOdmeUS+w4Q6dZvTEDHb=OP=5JBzo-M3QmpQ@mail.gmail.com>
	<CAExHW5vOH-=1KhaL8S4xVVzSozvrbmbBVg97p0obwEW3sD57Cw@mail.gmail.com>
	<[email protected]>
	<CAPmGK14Btk0odkH6vwBhBGjCexmmWcM_D3DG0pJtObj8k_Unag@mail.gmail.com>
	<CAExHW5vVwZdvW1Dfy3oJXVDBffJUvAwhaCw3HCSC38B1ie_H1A@mail.gmail.com>
	<CAPmGK16pn+k0tLNR8NvZdtiADpnjZPYK-HuaxwOmzHzUgTE7_A@mail.gmail.com>
	<CAPmGK14Zn9NwKPPmBrUyN9ALBJa2nv75-LOVKNBgRN=ehYnKkw@mail.gmail.com>
	<CAPmGK150ucoQy96dUu6nu5iXBxyqrPrpqR2KMZN2CCSrMq0USw@mail.gmail.com>
	<CAPmGK15AQBXTgF_8EK=AY-Q6OLmhTuQSTWittLSVrw9Rvec25g@mail.gmail.com>
	<CAPmGK14fT9_hdC40s7MWZX+-k87AvyusG0qjd6zvngEgumdNgw@mail.gmail.com>
	<CAPmGK14RxMWYmNEHcjn04ZuvqxZrbasPT+zMNdd3T2V3R9Rz2A@mail.gmail.com>
	<CAPmGK14ZTHRGPprEhzEe2TJxaCcjNVeWw6tue_gqp=9DzqYnMA@mail.gmail.com>

On Thu, Mar 5, 2026 at 8:52 AM Etsuro Fujita <[email protected]> wrote:
>
> On Wed, Feb 25, 2026 at 7:22 PM Etsuro Fujita <[email protected]> wrote:
> > This was reverted in commit 7d4667c62.  I'd like to re-propose it for
> > v19, as mentioned in [1].  Attached is a new patch, in which I added
> > to the documentation a note about login triggers executed on the
> > remote side, as discussed in [1].  Other than that, no changes.  I've
> > added this to the upcoming CF.
>
> Here is an updated version of the patch.  Changes are:
>
> * On second thought, I think the name of the variable
> top_read_only_level added to connection.c by the patch is a bit long,
> so I renamed it to top_read_only.  Does that make sense?  Other than
> that, no code changes.
> * I also added/modified some comments.
>
> Comments welcome!

I haven't yet realized the benefit from this change since I haven't
encountered issues caused by the current behavior (i.e., a remote transaction
starting in read-write mode while the corresponding local transaction on
the standby is read-only).

On the other hand, this change would force any remote transaction initiated by
a standby transaction to start in read-only mode, completely preventing it from
modifying data. Because transactions on a standby always start as read-only,
the remote transaction would also always be read-only under this proposal,
with no way to make it read-write.

I'm concerned that this could break certain use cases without providing
a clear benefit.

Regards,

-- 
Fujii Masao





view thread (20+ 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:  Re: Options to control remote transactions’ access/deferrable modes in postgres_fdw
  In-Reply-To: <CAHGQGwHjeZNppb4N7oG4vdPT1i2RY+=YRA=NUwhwYgpsjRyxfA@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