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 1vrXg7-009nxQ-00 for pgsql-hackers@arkaria.postgresql.org; Sun, 15 Feb 2026 08:40:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vrXg3-000wlV-27 for pgsql-hackers@arkaria.postgresql.org; Sun, 15 Feb 2026 08:40:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vrXg3-000wlI-17 for pgsql-hackers@lists.postgresql.org; Sun, 15 Feb 2026 08:40:27 +0000 Received: from mail-dy1-x132f.google.com ([2607:f8b0:4864:20::132f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vrXg0-00000000iHA-3NKv for pgsql-hackers@lists.postgresql.org; Sun, 15 Feb 2026 08:40:26 +0000 Received: by mail-dy1-x132f.google.com with SMTP id 5a478bee46e88-2ba6aa57d5fso2243611eec.1 for ; Sun, 15 Feb 2026 00:40:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1771144825; cv=none; d=google.com; s=arc-20240605; b=IsVu8BZ4EJyzrBEICLG+GBqI0vrLTi3vtfHfML4xsZHfUo1lNkF/QowlIMOtYZo2Ty EIJuM5fomhWt6Vh9BY0GbU9ba/30ZuaEIyy0k+oEh5dlx6oIrSoNj1MHZiC6nihKBM62 UeBvJr9YIKN3Tq4lj7quXWUPRU71MZFrU9uL88x9DGqWSCsebbLDS+tNzCNHjNzyCr7h ONGZrMN+sdfp3mKvQuQov0wU7iAy/2cZ8JicTGSya/aCbfVkHYUZJqkx/rutL23vEAa6 ytzCphwfnx/wBgzj9+SzW5MLe6Zr+JbRRK0REC/dwXVQrs0K4bur3+SKrQKdrzZOg/kh DT1g== 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=1jM4BrHc9luWQt6YP+h7i7+cpWwKRlUZyGzCrc1FCIs=; fh=Vd6qrp0Vc1jR6yjQ6HY6e75xuwsYS3bSRqtoRFm4a7o=; b=AXqbL8iw5h4JYgUkheq31ZgBngtqsI8BXyb1Cb0HAFgBP4vxYGODlh1VY1c7xEQC18 pZOV3TnLoNwRVCbHcU5boHOxuH/zo+rIiQ4b7cLuou3nDZfKQoR6Od42VXaB/sldfg33 geHsr1ZnaGmbOgFyuaGTPNpQWZE4Qo6HRICuE3CAONXh3NJveDA5R5fWPccufvUOCEhb pWFGvB+DMQobTd5+Apuh9RYbrbMBxwQk5y6xjcYSNjm/xMFWT67kXcxNtug0arviU1Yx /Nke+Uk1FA0wdzu/f3U8i0sFkaD/JiNGDSRDQ4P49/KRDYzUpimOtyJU04h0aSoBZufA jmvQ==; 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=1771144825; x=1771749625; 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=1jM4BrHc9luWQt6YP+h7i7+cpWwKRlUZyGzCrc1FCIs=; b=Dg+8llidqQNZn0RY5XrXFhdzlAoqjExLwmAfjMnF5lwbuniQnXSJrwYfopfvlZQBqw qvEOKPKDBBi0Wb55g9vtLptOBuaTqodCOoUt+M8P9/18GF/8qoeCRZBHk0x48q0UuxFx rCE2YysWFg3enJaz8rzGDd7Y6t8movZnRdYEC9hEHS8wj+XbEQpKz6NuFCBczyDJWC/w BNBeOPwHwaXCNgtTSwnJMmxHzcvIrFwIzoOYEtdhrbDhs4ZB/PRbStG5vFQByghs1stS FBFG/QsYml1vYd6NC9jZd+hq3zKt9o8+7d3sCxmeiAzjbHnsepoTSg802ADZwzAHzuIi Oopw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771144825; x=1771749625; 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=1jM4BrHc9luWQt6YP+h7i7+cpWwKRlUZyGzCrc1FCIs=; b=oTJ4cl5HdON/nc1EQpZHw8L/VU6uNGiTx5Uis8xL0fEqFvQETMCyKZaSHRmU0Te/S7 XGmzg3h7lhmOLfgiUrV3pSA7no8+xv3w7pZXoGhkPXoTe3aeRcNM0jCry0Y+nHfwm7xK 3WQFW9ZNurfjy2r3Yfn2w0hMZA3pqB+xMG7/TI2HIzMqBDT/Ptuyx2fTOM4074vbEpbb RQ+vBnbclbn149g1ttBnRjdenB72GXYDcX+l8CWhNZYqjiSDRtMj15lGVA1FdkIm4aM1 bPRJywZlS2JRZx4SaLvbfN8V2agWiT1LKyJsLJX6ZebAPgUmiVgBkOCFYIZB4IY56MJT pbfA== X-Forwarded-Encrypted: i=1; AJvYcCW5s3B24JxGgAeE5n8JIaLK4nW+kN7iZBR7S1o//7yG/vrEIFiBH78ng59N01RD5/GsmArZldsoNsPXFX1V@lists.postgresql.org X-Gm-Message-State: AOJu0Yx9jjo3CZEZ4o+Zpu7q2vVbwibphsIUMgnBK80yxgcpVHDF0dcn SMQfpBRKdM2U00/Ul5znBpYUjvi3VFFczs4bx2hRPj1D5RykrFs6lmZS/kCbwdd9XxYGQLpYKDx WdCDsJ8XalCbm32uX/H4dryWM8Rn+Z2M= X-Gm-Gg: AZuq6aJQqId4TrRKyBeZah1ha2CDXN0McSUD9plVMbxSsBFJC6oJu4Vywc9ghPPoXJ0 VRVxrB0R1JaLzx7zisWkjNxqz6Eh3B00hkWrEQfwAZZ6p5btLYtKT/PEz9QyMF3JiLHPneI2qTq iMS+zPQIexvsWa6nTPeAyLNPe3UQ0FayrgsUvgDhKsHjYMq9GqL4a5NqUARqzkEWDGBHLflDEwB Ctc0adKb9xnSWmlsUrRPHqi8C+an55R1Izv9VR2wOGghq7SFzKU0pSsYEoBn9ru/SJuo/g+sxCk HV6GuHAVyLTcHrFuqxDy0OR80HKg3UIBOhwDhx0k09dsEILi2S/MaHZETL8PboZfwa3aYJgLFRI EXZm5s1pH/2S9lm4VYmxttO/PUC6jcOpwx50mni4f X-Received: by 2002:a05:7300:a54b:b0:2ba:99d2:403a with SMTP id 5a478bee46e88-2bac9352ee7mr1386776eec.10.1771144824686; Sun, 15 Feb 2026 00:40:24 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Etsuro Fujita Date: Sun, 15 Feb 2026 17:40:13 +0900 X-Gm-Features: AaiRm5232VJA2qewtXSWvrwvGzzB0_F7UiwHRFZJIDvi1kwQQ9gsyAS1ISRws24 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 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. Thanks! Best regards, Etsuro Fujita