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 1vxz7F-00HJxm-0W for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Mar 2026 03:11:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vxz7D-00FWqu-0b for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Mar 2026 03:11:07 +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 1vxz7C-00FWql-2u for pgsql-hackers@lists.postgresql.org; Thu, 05 Mar 2026 03:11:07 +0000 Received: from mail-ot1-x331.google.com ([2607:f8b0:4864:20::331]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vxz7A-00000000ika-48qe for pgsql-hackers@lists.postgresql.org; Thu, 05 Mar 2026 03:11:07 +0000 Received: by mail-ot1-x331.google.com with SMTP id 46e09a7af769-7d4beaf25deso7085538a34.0 for ; Wed, 04 Mar 2026 19:11:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772680263; cv=none; d=google.com; s=arc-20240605; b=NMZJOnl16AuYebRKEIs61b6ywDLUMXsfjJFHthY7eqgSGw4bRwHuosvpaKgSXXbIXS gr6rEe82yBJoVlxeQF1+JYRMKJF0OoOGemoUlVgknr3cMQuKF1xHbssvjxRjEpRb4+/l 1kcB8WVaadmtrzl3a7B7YRvwXx2vdLhk8BD+5vhqc9OGW9eVWZgjOgnunyM7J5KxYge8 Bcu5lax+J+gfY3zGunbfHHjppkpIoRyHJboQOgf0zfcascQwckSlASSVUeR/hJyQ8N2x 4LT/B6QjBv2GjyAbU10OYg7yMc7HSqpyHNgdgTMxbxIzvsDCG1BZuNlOlswzp5jgSc+u am2w== 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=GSmuZUlFu/g9itDGWnBNl4X7vllftEqI4MYl15Xjq18=; fh=u/8jJBJ/w2A/r8LrTVs5MpMhxyVbh/EqVhjDJuwOEdM=; b=kr7NISzLnXOun2imHhix7zqXFgYNQ+BZ/k4bzJeagiSvqL+doJEO3Vxdswsd8H/NqC mOoSddBjefwKDDCZqiL4vr/UWUS9oQMoiU0PpOhPP9eNRdlXeR26m5CMCRneMS6NRDc7 a83+O3xMgt6rJYo+aINTkYRvYT5GYwuew38XZ5lJY+z/zsJeG6baSyC/sVLn6a9peNb9 yP+BNTsvkSj+caAXEr31oBSj6SJ65wTOu7nh7gvaHAvW1A53ADEFNA0ewgWrWnuYBOqO hoNwx5TI4VaiwMCPp0cexvk53NaDa6IesEjKohCwzCCNlw9qdQAY7+wq4xpLYn6aWDgk 2fzA==; 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=1772680263; x=1773285063; 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=GSmuZUlFu/g9itDGWnBNl4X7vllftEqI4MYl15Xjq18=; b=XeXaRR9I9s4w9ykOCFWBN/dpiwzh1dlhSBkFAfMbQKWu3Pu1ECK3DpQ9kyc0GoADYH SSE/5BcncHRAPWjw0VaEVWkyVoyJCUFdkl8ypAqYXFzhFwEqdbZkNen/j3RYBcnNZJQI ybcIDF5Sj+lGNePcATe0NP76R7OU9gOhyAZP/J+7WdoJZtSvO+SqbKOlAsJK1h1a2miL Mni4TQQWQgOYPVduIINBiwKR7uWK8gHgwDUM3EXV5PJrvemdIK62gneQ5ASoN0Epm2J2 w/y1+1w5zADiAAFZTyHb9NHKQqfxn1r9AGK7UoRQldkRYgTGOMDXrXpes/77j3WiNKt6 qN9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772680263; x=1773285063; 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=GSmuZUlFu/g9itDGWnBNl4X7vllftEqI4MYl15Xjq18=; b=OvuRGduKoDgfutTKgpQMZEejedNk5Q4AE5BaFP1c9pRhkHc16AXOsD+2cxo6imRw8U FYHe3pVjNU6CV66Ajwkl1JBWhv8+IuKukW081O1lusw+kOCDNwkbeGH1VCk8oCfuVxzH uqBHjLK2BWsxqHDcV1iS0IKySbgjYl5Zsqg8M7YlyOYsMSa0XQMfVUqAhyoTaU4TWTGU T/g+8XC1scE7KerfKehU940/Qc8ykAyub460NXnV/TAnO+kVw75z8uet69UrkU1hLncI G9VkTOKScR+/R51UV8JXS6wcqqTcBq9GWCw30uP+MM4RrvCy09qfpB+lI1qYJzgr5qe3 c4Xg== X-Forwarded-Encrypted: i=1; AJvYcCX9VELeHE4f7r69nV1TZEmPfrgqq5egUtbnV+KN9yGQJG1KA4mp9KlUK6UGyfujKOVfKUUOme1vcnD+43dX@lists.postgresql.org X-Gm-Message-State: AOJu0Yy6Ghnt376ulQkq8MNI9xmjJ1nE6PVpfgWfCvGKqGvLKG/7Q0r2 lnQm4qUSwnN2Lh5jpO/f8ESHW1mdWTBP7jI7vK8qywkE9CQEr4k+Q+lvMBp+RxFSIRuMsKDaMPK h5QKcv91jpNe4Pr+JeIrobbcxihxvaHk= X-Gm-Gg: ATEYQzyahKMYuorhriW3xmG1BDQzhevDOVvTRxTlXxYUzVyYSkIACMst/U2QI7Q0AmC Bqofx90AC6r9QGLgg8xZLx2yYCs9UELVqjdKODZonMwAZQ/B6VNhv9Gn5LetTVzm9yvq7XgzHxi BxrIFZb1deR77hKBmjoALpLxsfpBhaBkmJhgSYC8qnfGfl1JljvEtGWgz+KSbY38VJDgSYAr/y0 nBeRHyh0fJoN7+BOkO30EEa0Uj5dQyvJXT2nX8HRAzJxxqOqlUD8vXuS8v+qEqIbbX9wyEWOPIE vFnAyv6Suf67IlBixZqpyXjURuVrDuI+9xGXvOwXmg== X-Received: by 2002:a05:6820:151a:b0:676:da17:64d9 with SMTP id 006d021491bc7-67b94544b97mr612363eaf.23.1772680262694; Wed, 04 Mar 2026 19:11:02 -0800 (PST) MIME-Version: 1.0 References: <3660951.1741016970@sss.pgh.pa.us> In-Reply-To: From: Fujii Masao Date: Thu, 5 Mar 2026 12:10:50 +0900 X-Gm-Features: AaiRm51HzSKph5hsXq0UREXPWebG1UqgE0vn3xYm3CyxXLdphpusNmVM_gtEkAg Message-ID: Subject: =?UTF-8?Q?Re=3A_Options_to_control_remote_transactions=E2=80=99_access?= =?UTF-8?Q?=2Fdeferrable_modes_in_postgres=5Ffdw?= To: Etsuro Fujita Cc: Ashutosh Bapat , Tom Lane , PostgreSQL Hackers 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 Thu, Mar 5, 2026 at 8:52=E2=80=AFAM Etsuro Fujita wrote: > > On Wed, Feb 25, 2026 at 7:22=E2=80=AFPM Etsuro Fujita 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 transacti= on 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, --=20 Fujii Masao