Re: Options to control remote transactions’ access/deferrable modes in postgres_fdw

From: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, 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: 2026-03-27 11:41:29
Message-ID: CAPmGK17-kgpiWmHd52ogOLUx=F00xL43G_MUnApNeSgeTQaBjA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 9, 2026 at 8:41 PM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
> On Mon, Mar 9, 2026 at 12:47 PM Ashutosh Bapat
> <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
> > If the primary doesn't allow modifying data in the foreign table in a
> > read-only transaction, a standby shouldn't do that either. The users
> > who are expecting a read-only transaction to protect against any
> > writes to the foreign data on primary will also expect so on the
> > standby. If users want to use standby's ability to modify foreign data
> > for the sake of load balancing, that's a reasonable ask. However, we
> > need to figure out whether it's common enough to support. That
> > information is not readily available. I doubt that it's a common
> > usecase. If this fix breaks such applications, we will come to know
> > its spread. And such applications can use dblink. Alternately we can
> > add the option which I and Tom didn't like [1]. But I feel we should
> > do that only if there are complaints. It's going to be painful to
> > those users who experience application breakage. To ease that pain we
> > should highlight this as a compatibility break change in the beta
> > release notes, giving users a chance to complain during beta cycle so
> > that we can fix it by GA.
> >
> > If others know that the current behaviour has a widespread
> > consumption, and they can provide backing data, adding the option
> > right away is better.
>
> +1; I agree with you 100%.

Barring objections, I'll commit the patch early next week.

Best regards,
Etsuro Fujita

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-03-27 11:58:13 Re: [Proposal] Generate pkg-config for server module development
Previous Message Maksim.Melnikov 2026-03-27 11:31:52 Fix race with LLVM and bison.