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 1w3JDS-0016BT-1T for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2026 19:39:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w3JDP-002Hsg-2X for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2026 19:39:32 +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 1w3JDP-002HsY-1K for pgsql-hackers@lists.postgresql.org; Thu, 19 Mar 2026 19:39:31 +0000 Received: from mail-vk1-xa34.google.com ([2607:f8b0:4864:20::a34]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w3JDN-000000003jL-0WZ7 for pgsql-hackers@postgresql.org; Thu, 19 Mar 2026 19:39:31 +0000 Received: by mail-vk1-xa34.google.com with SMTP id 71dfb90a1353d-56cc6fe8815so410171e0c.1 for ; Thu, 19 Mar 2026 12:39:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773949167; cv=none; d=google.com; s=arc-20240605; b=lda0uvkZDiPSpCbDduBiRuwGni0FKt6qRwc4bqz6JNOo4WtLjh/cKyjCXxToBJKQ3g fsvIstqNm57GUmxT//I7eu4c1k25ZrnMjTNA7O6zPFnWd5yMvcVy7+nPrUtKSXEBA+Du uTroW41JHa0YlGILLgmYpBdKXrkj+AzvFNOFTIsF727u+nk59c4hOvBS/+zux9d+H3mO QJnw1vOydjeDKuaOHbhFEHcFogxTRmv7AdVubnYQvu4VwoLvU1rRQZpsqSAUhEqhj3uK BTJEMmmivO0t8dsRYUAVjLahKQrkCjwwihU9AFIMviJV9FkCBeGKyPwBfKgH10cDM5zG eUcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=vSuIcb0XLD+Kqpt4QsM06tfCF1ouVfXyjGfkJxG3Pq0=; fh=l9cZqMq/H3AQOVG+BGH5xyi4FdCTwhnFXqHpjKlusP4=; b=EdQyO3BB6KziYPRFAqpQgJGUNf/bB51gh8dFlglp1MzjFswAlAdPmfYPmyFXOFlzOQ /LcDuxzRR7mme2FD/dygHsJ1APtG73egGP3YjTr46CARaDScKFzLd66HswgPy49fWjUe jmqrfip5uZ3i5WRwb4fwEa3s7jGYpIbTgOm5FwfrtR3JW5scTknlI1BMSW5doWz/0bE3 n2146Huchb+TNuAiMelHYHscMCyCjhyZ+4SC7GB2nvuK2yQ6ToKpDshfPaU/WUxxdq2o qri7HBjTrfSFEICh7GW9PPyf4yEA4EP2C7ifPS6zOOEz0jSq8iZ6ubX53oZBsr7UUu98 JMdw==; darn=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=1773949167; x=1774553967; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vSuIcb0XLD+Kqpt4QsM06tfCF1ouVfXyjGfkJxG3Pq0=; b=Cm9ZL0PC7GSEftqOhUVvsFq8Y3JlMoyD5vn9OH5LIltsc1WwF7bKJZlVSUt/jH2c6+ Md+uFnlZLEjJZz9jBEP7Wl9YnPgq7NR+HdxjYSqsPqBJtd1rTTfq+bukzdog2+3f1y+W HiMkh2/gVDE09MkSFUK6qmNi7BSHdcvCCwvhKkvGQdHC8qUeDur87BRBNHnWkUDub2lF GYyjpNSVAuKd4/iu7LvXV+FvwMkwlF8fgk2cjmfzjcZO2x+I5GDM86bgdzqa4BbdF+IG YSyFtyROYh12HfwBIgmcWfmQ+51UipkyouqKKbYbcIykRHVYrP3p9tFElEWC8XyTCQtp tx8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773949167; x=1774553967; h=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=vSuIcb0XLD+Kqpt4QsM06tfCF1ouVfXyjGfkJxG3Pq0=; b=E8+O9LnQh1p71q9r6bljolVrPg60HYwquEwTEbE8kvMs4GqvOrp9nrOOsrTfBxa+Fv +SVY+Aoum45ICr8h1ff7uZNiak1YT0IcDPwIsT00DzfkkzU+X/SFnEwqyL9363QgfjgO NbBGbDt4S14O5Sh4jZ3CFgvgMgjBvSld4HhinlJPZzRadaH08T+mtNreuapbyEn0Xro/ a7gXU4nYVOjqpzGMLQVaXi3f0ocs7J0n9aHhw8Nkg4QuY7q0s3sQ75Q4kmECNna/Blp3 xEl9wGPCK72i6ruPgVx4GUygSeNHsPFHw3iXkx6bWiKkz2wrYoGqDq3nhxXv/dWxFfw8 2W3A== X-Forwarded-Encrypted: i=1; AJvYcCULVY9qSiv3JZNKt0caP0q0lsxb6lycee8dCwzub94HuVjjUr/mMeVGVNB3t5TwsfuBZuW2BNS3vFjzSlm4@postgresql.org X-Gm-Message-State: AOJu0Yw4vm8EDl2Wqvsl3qW07YsawqEYYa2zWyvLtCuErXy8Y+pmCCa+ 8ruRtMR5B1t1+GVKtmjVRakKIlrQzyB6mEYOMQ0k1tQKZ94xtfXRu0Sf14TIjDr4/soyL+1yzQg i/ICh0jJDNGDo71dgka8mH/WVtLrEkh4= X-Gm-Gg: ATEYQzxxQ2vbzym/ZysLf57L91Z2rcuxD9YyZX3fbCCVR0VIa8/qwAKsnHiJEF978ua f99aJ6vZbThIMqmcx4FpjhafUg10ioWtTeZkK6WZAUvBl+uDqPFbH9fvi/ef2516BxgEZDcgDSE nZqA7nAup7P3NBAckNKyb2+Jj89sp5TP+QdttdLGNu1ndbjxGaT7zML63NKMyXaWSIgaSsnkX5o C7JsAi5deYd1RpGT4oF1cj5fzQ9koA3ykrwNV5mIDUPUXj13ToanOe7Z/PWTfoPraObb7HesPUy 3XOYdAI= X-Received: by 2002:a05:6122:a1c:b0:56a:9841:efd4 with SMTP id 71dfb90a1353d-56cde325c93mr203445e0c.1.1773949167604; Thu, 19 Mar 2026 12:39:27 -0700 (PDT) MIME-Version: 1.0 References: <64f1c69a-ceff-4b17-8298-58f255d075fc@gmail.com> <485a95a4-3220-4165-8be2-9508afd6a0b1@gmail.com> In-Reply-To: <485a95a4-3220-4165-8be2-9508afd6a0b1@gmail.com> From: SATYANARAYANA NARLAPURAM Date: Thu, 19 Mar 2026 12:39:18 -0700 X-Gm-Features: AaiRm50LTOoUEWcCC0u0VWsLMLuIqDditGntJ3Stft4oPV2r1lGWN0cqAqqHGoA Message-ID: Subject: Re: Read-only connection mode for AI workflows. To: Andrei Lepikhov Cc: Andres Freund , Peter Eisentraut , Bruce Momjian , Jack Bonatakis , pgsql-hackers Content-Type: multipart/alternative; boundary="000000000000fc18db064d65b9ed" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000fc18db064d65b9ed Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Wed, Mar 18, 2026 at 7:36=E2=80=AFAM Andrei Lepikhov = wrote: > On 18/3/26 15:26, Andres Freund wrote: > > Regardless of the AI angle it's quite useful to be able to put a server > into > > read only mode, e.g. in preparation for a planned failover where you ca= n > > continue to allow reads but don't want any more writes. Or in > preparation for > > a shutdown you want to prevent further writes (so the shutdown > checkpoint is > > quick), but you do want to allow further reads (to reduce the scope of > the > > downtime, by allowing reads while doing a CHECKPOINT before the actual > > shutdown). > > It returns us to the question about cluster-wide V/S session-wide > read-only mode. Should we design one of them or consider both? What do > you think? > +1 to scenarios Andres' mentioned. Additional cases where a cluster=E2=80= =91wide setting is helpful include disk=E2=80=91full events and policy enforcement,= where write access is revoked but read access is preserved for data exfiltration. Session level is helpful for the AI use cases or to provide controlled user access. I see value in supporting both. Thanks, Satya --000000000000fc18db064d65b9ed Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

On Wed, Mar 18, = 2026 at 7:36=E2=80=AFAM Andrei Lepikhov <lepihov@gmail.com> wrote:
On 18/3/26 15:26, Andres Freund wrote:
> Regardless of the AI angle it's quite useful to be able to put a s= erver into
> read only mode, e.g. in preparation for a planned failover where you c= an
> continue to allow reads but don't want any more writes. Or in prep= aration for
> a shutdown you want to prevent further writes (so the shutdown checkpo= int is
> quick), but you do want to allow further reads (to reduce the scope of= the
> downtime, by allowing reads while doing a CHECKPOINT before the actual=
> shutdown).

It returns us to the question about cluster-wide V/S session-wide
read-only mode. Should we design one of them or consider both? What do
you think?

+1 to scenarios Andres' = mentioned. Additional cases where a cluster=E2=80=91wide setting is helpful= include disk=E2=80=91full events and policy enforcement, where write acces= s is revoked but read access is preserved for data exfiltration. Session le= vel is helpful for the AI use cases or to provide controlled user access. I= see value in supporting both.

=C2=A0Thanks,
=
Satya
--000000000000fc18db064d65b9ed--