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.94.2) (envelope-from ) id 1typgK-00Bm6Y-IN for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Mar 2025 10:14:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1typgH-007RZF-W0 for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Mar 2025 10:14:17 +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.94.2) (envelope-from ) id 1typgH-007RZ6-JU for pgsql-hackers@lists.postgresql.org; Sun, 30 Mar 2025 10:14:17 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1typgE-0022c3-2a for pgsql-hackers@lists.postgresql.org; Sun, 30 Mar 2025 10:14:16 +0000 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-30332dfc820so6273508a91.2 for ; Sun, 30 Mar 2025 03:14:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743329652; x=1743934452; 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=Wtxvs/iAEnqVjmiL/GXpL7NUfmBL8HSY+nRfGyVbBUQ=; b=QG+4O9ksA+WKqlVKXX3y5N/jppB1IfNYOdpa1tW1yiXyU39U4SxSrZp1fcNHmAjN8q ww2lv8qPbxpGGTbo8LpgKRifcosn+1k9pyog6SCyW1JlA9d5tiVd70SzX/leQaJvuLXy CxzxcQrN4q354oHx7DiJpgLJS6z0qVT7eW8k45ywGmaDAzhfug6VdWVsLe3vi8T1VnN0 nBSMUp1eUUdS1r/4l80lDReNJpiUwZlDBmuNdswKo81W1NDRvgKoWKdmMECFV6Qhpvul l2ajtkJet8+xiApDKAtfnHHS60aX6fVIr9nqFe5lGfIIb7X4bEWiVFZvV8hwDJ0zgLD/ Wbvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743329652; x=1743934452; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Wtxvs/iAEnqVjmiL/GXpL7NUfmBL8HSY+nRfGyVbBUQ=; b=G8CdiHYf+7XVS0Yzk5T9gGaea8rl97654Kc2KYaSSeRqLMxgc+Jy8H1A2jLC3w4w9M gt1zjS/5uAeQ1OJx1dXWipfPQ08JbAMU6RVKofIWd/dlxaRgD/0d5gMV2PT/Brqk4pmK zMBGKc4Nu0n2sscS4ugOlKGbB7e8ki0fWHDRpxk0d8Zr03EZxEc+I3GkBCnEuwXfED/h cyPVDePzncgyWxl9TXolpH6VkcA3DjegijUYoBRv5WfgJiueMpkzIsb5HS+AveXeP1wG VKzWFGIu/5j9uicPnJbb1eA7owIhSFbUu2D7w+b5yeOF1E4g4/9y1eZIGPREgnjDiRzc 4YDQ== X-Forwarded-Encrypted: i=1; AJvYcCV5rSZ0RR5hrpKyifHRZ6QrxFiHCe8tW0CylgRjrwlNgZmB9WxzmqiK/hlCyZQhp27CuifgT8oeLYN2Idsa@lists.postgresql.org X-Gm-Message-State: AOJu0YwyrSOlCxej9jfA6z078ZXbOPf+K5f6S7YpaTWrD6ld4MA6xUch bCgioVnyCXp9uAXSdhhwimLPlrafWoRJN+1ynONPzX1cImzWRFacHStijum+Sa4qs1e53PYpzEH bTlQvk7FhPguvBCc9zk7ho8jKa08= X-Gm-Gg: ASbGncvIWSjJI2V0BiBYcNj8gt9MjICRsX8M7bpRyez+Je3sm2CnovzEXILz7IZUxve hCO3hQe0AP05LlDt4kGgQko9qO61W+mRBZXWBW2b1EoUq7nQhmlyUEnViB7Fkz5DNh+C/zYyXZQ yjwaK+QE9E39i8QrprEtCqgN3XoyMtUTaxjW+oBr3s2nCXLdIioJTbQ60vbjTt X-Google-Smtp-Source: AGHT+IGaov3y96sBuC2GiGAztAMh91lf1Bra5cB9FM3JwXajd8CNhujZ8d8+jjtO+4PgoraC5IBIkOlp5hdKdtO1wWg= X-Received: by 2002:a17:90b:1a92:b0:2ea:bf1c:1e3a with SMTP id 98e67ed59e1d1-30531fa41f4mr9773762a91.12.1743329652422; Sun, 30 Mar 2025 03:14:12 -0700 (PDT) MIME-Version: 1.0 References: <3660951.1741016970@sss.pgh.pa.us> In-Reply-To: From: Etsuro Fujita Date: Sun, 30 Mar 2025 12:14:01 +0200 X-Gm-Features: AQ5f1Jr8MyxTIkRnQSA3Cw8qsG819fDo09MM8Vefdc8Y66SFxXchrDxu70FD9g8 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: Ashutosh Bapat Cc: 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 27, 2025 at 1:25=E2=80=AFPM Ashutosh Bapat wrote: > On Tue, Mar 25, 2025 at 4:01=E2=80=AFPM Etsuro Fujita wrote: > > In the patch I also fixed a bug; I trusted XactReadOnly to see if the > > local transaction is READ ONLY, but I noticed that that is not 100% > > correct, because a transaction which started as READ WRITE can show as > > READ ONLY later within subtransactions, so I modified the patch so > > that postgres_fdw opens remote transactions in READ ONLY mode if the > > local transaction has been declared READ ONLY at the top level. > > Nice catch. postgres_fdw replicates the transaction stack on foreign > server. I think we need to replicate it along with the transaction > properties. And also we need a test which tests readonly > subtransaction behaviour. Ok, will do. Thanks for the comment! Best regards, Etsuro Fujita