Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vxw9S-00HGvQ-3A for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Mar 2026 00:01:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vxw9R-00Ezwq-0S for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Mar 2026 00:01:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vxw9Q-00Ezwi-2Y for pgsql-hackers@lists.postgresql.org; Thu, 05 Mar 2026 00:01:13 +0000 Received: from mail-dy1-x1329.google.com ([2607:f8b0:4864:20::1329]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vxw9O-00000000hKT-0QnN for pgsql-hackers@lists.postgresql.org; Thu, 05 Mar 2026 00:01:12 +0000 Received: by mail-dy1-x1329.google.com with SMTP id 5a478bee46e88-2be26d11b95so3505709eec.0 for ; Wed, 04 Mar 2026 16:01:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772668868; cv=none; d=google.com; s=arc-20240605; b=R64ZP0Sc01cCCVJCymaGMFr9JMy/8dpGLoTcHRH63jY+CuRKaY/9zoKgkvlMxkK8en 3NYq1jyxKEosdigd8uvE5roioSWw2NantdlOqFVg40zGAgTAx0ejjfBfErvQTXgcZ0zO 8/oanT1BpBnuo0tMJi5wkCm8dX0h8rbnH0UptRdOwwi6RxN7v0uZNdIL1SYC2+c+mJB2 JO9yu5MLrgaFwZoPgxyNEDZ7nqRwP5HJQsDsn++JvaBLyiBhtOdGuBYv64TmIPyj6GQo OTGAHABEoMTdcFiCQ07cEgcXm3egQ++y12FFe5r2kKxOXCM0y2+3Cl14dbtxj7+v788r o5Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ZgvZ2W1RHPDaZj1/xcj5Lqi2AbeGPNosCFdrqHtWgA8=; fh=iSa8DBAawu6mxMskg/hUWZ0edcpCDUHT4cr+pRb7PLg=; b=bcD7jlka2gUBNy4s2nL9x+2Mpurd0io/Wrrb9bW4eecZy4Pbejh/CIGWThKnZE582r GS0La7qLxk1sYiNwkrZvutGOR3l8t/FM7Os0oHV6kAIZgXMnC13zdsKhZdK0A1NyqZZ8 uikn0XVb4LehL8ZFpgFqjt5/bHS2nwcgg6RQwCDkNRuaNt5AytVuzawYjcGj947kNJQv uUuctsYdVVbt1pp/8uQ0dKSE8kCQJfdVrNVviBg9L12+j7xU2ZCSHL6ZiAJDnfumZoFO UKf/Yt4L9i9tQ1MKsHS6TwXzEcTcV788XIrG+CwWGXa25SwuaNquCe3QzRPiFriV5lkW gY6g==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772668868; x=1773273668; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZgvZ2W1RHPDaZj1/xcj5Lqi2AbeGPNosCFdrqHtWgA8=; b=fHoHKJLvevljr/YiLpZhUryMheMtAw8dcj3fKbd/n8HOdqg6O6QAdDlNIeASY+scCf JHqypn4dDCLNzm2iTPf9HE6IfrSF5KcH8+wJRayVJQ0nrONhCL79g1a7entPg3mUtAWp GdUgYB/igUypaKXTJTvcvrjDc9mwu7Hv7s5yMBOQ+73dFMRE0PC8MWZv3HP+q3cSasz2 PPvggFDzJsb7kttEUiOTKEwekTq+haOxcKkGvCOR8Jqc0GcRiuUEi0V/wDmUtrdkoiud xWu5VRU6pDr897IAvXUQy5bxHH0CNxhBrLhKffQ0j3ch/1JrX0wy7xPKfxua+sbi4LTQ 0YAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772668868; x=1773273668; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ZgvZ2W1RHPDaZj1/xcj5Lqi2AbeGPNosCFdrqHtWgA8=; b=eFA87ZAIHzdExBLzyuTnC7PAxfW9/H3F0pSLF9L6fl9aaenKI0Im+johnvpEoDwnlU vG9yKWMOmGdU1F+Zfevh2yEFbSFBEAwHfNATla/U9vyiR0aNTY+ItuRKkd4XaJviFddA RWvxTPaVWWAIF4d6D7/Zsgw1zscp6P3Ndn9yHfldZl3VTkfgBDWZ68OcOR75PmnSRImm 9L6wnsoV+XNeaM+vVUeG1164UBfmP3HkNXEbuKTUoFmu9cSI93vQhPECPvQSm3Vomxg8 r/GpjK2MNObW0tL+80Y86xXeXj5jGjrIwU1Ah84WVy2GM40jt3Bg/bVddiXOyvDT8tef 3Omw== X-Forwarded-Encrypted: i=1; AJvYcCVqYDXsQ7HwlSRWRdXXcBK1gCLQAze9SCOTHAHOh2J/w4HZQQ6kT5/8VtAkKkLuhr6rC+ebfYOBQWzCk9jz@lists.postgresql.org X-Gm-Message-State: AOJu0Yx5TVlk4xioZBFh3f/oKrlUmVcrmTxXS2ukL2Y9tSCpD0RNZklc HtiRwS6yS92w+vi7Bvbm+Mx7HXPQmL1mhmybLxFmH/0g6lCyCvJc0ZNLb7vUml4/ImbmoMzCN+m 9sPXK5IKAN8JYmXJotkHNje11ivXwBLFj00pV X-Gm-Gg: ATEYQzwNW4A3d4Ph7wdj4brUGp066OvlwdCEZ9RTogaZv5S/y3UiIG6Eg6uTeO8T2TD OWEhcR1OwyNX+6q7vAlNOJFCk1BnJlxkp/0Cr0WFtYBBDpkO9jS8W+GInMvN3xKd0jn9cbgOG5V 89VGD1bu3L+s4NT4oKJvfgzOv7X5DotVgk3tIuckv9Nl/wjXZm6UMitL3vU9V8QvV2puUi/1/Jy 8bvUbIimR4J9WyXBSDuVQe3/stAT9RWOiDI3M8m6o77yXxmZXZY7blOyns+6j1bEDHig6E1uUfU qrtUrCEzQVKRs7d4hBJ0dqrWrWGPEkiCFUB+nGXeYURPIjtOS4GnBw8ZLcSsH9Q0ty9gzd8JFRi mUqkDkhh/3j0i/DXIRmeJgl5Yr4siEjd9ho7jOPpe X-Received: by 2002:a05:7300:6da1:b0:2be:2695:d137 with SMTP id 5a478bee46e88-2be3106e6b6mr1849412eec.21.1772668867724; Wed, 04 Mar 2026 16:01:07 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Etsuro Fujita Date: Thu, 5 Mar 2026 09:00:55 +0900 X-Gm-Features: AaiRm53Z4GSrF0ogpBFyL7UgWiHGtdA6nHndiY4WSvzamj4DVSjO70Ui7UNy8gQ Message-ID: Subject: Re: pgsql: postgres_fdw: Inherit the local transaction's access/deferrable To: Fujii Masao Cc: Michael Paquier , Etsuro Fujita , pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Feb 15, 2026 at 5:40=E2=80=AFPM Etsuro Fujita wrote: > On Wed, Jun 4, 2025 at 1:15=E2=80=AFPM Fujii Masao 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/CAPmGK14ZTHRGPprEhzEe2TJxaCcjNVeW= w6tue_gqp%3D9DzqYnMA%40mail.gmail.com