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 1w2UqU-000LIh-2W for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Mar 2026 13:52:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2UqT-001gKt-2S for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Mar 2026 13:52:29 +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 1w2UqT-001gKl-1S for pgsql-hackers@lists.postgresql.org; Tue, 17 Mar 2026 13:52:29 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w2UqQ-00000000bwx-3PU7 for pgsql-hackers@postgresql.org; Tue, 17 Mar 2026 13:52:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2026010100; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=6Ll9aNwdt/kve+P+MFyOdQ5a3pTAWdYdwkk4t+w53C8=; b=wBSoH jk9sOr1K/m70csDdpZ+l0ndStZb9QrXLoC79YH9U5xGXuPUo50q5UFaYnEl4vViisAJfYuZFuZ+G3 yYH+ZotdQ3FTqcNtJ7NU+7TZ7bMoDj/Dc8OiN75JdMnm6CX+pEukLPyG5AKwyH6nApLIi3tkOFfAP 297hjAF5AKOYfUlcetXG9h8taUBatNp3X7leUI/U21g31FwkAhZH+hBDwQq8zFe/y6zF5Qyu1J9VM wxH6B8tzp1kaQTeNbbswYKmaYJ0I2o55/o8XeYLcPhaOpkmFTgPc/JnWcEp+9KfeRFMjM2A604Dx+ WQ0Th876ZA+fpkX02jTg/0CEOeKog==; Received: from bruce by momjian.us with local (Exim 4.98.2) (envelope-from ) id 1w2UqO-00000005JUm-0d6i; Tue, 17 Mar 2026 09:52:24 -0400 Date: Tue, 17 Mar 2026 09:52:24 -0400 From: Bruce Momjian To: Andrei Lepikhov Cc: Jack Bonatakis , pgsql-hackers Subject: Re: Read-only connection mode for AI workflows. Message-ID: References: <64f1c69a-ceff-4b17-8298-58f255d075fc@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Mar 17, 2026 at 11:04:25AM +0100, Andrei Lepikhov wrote: > On 16/3/26 22:25, Bruce Momjian wrote: > > On Mon, Mar 16, 2026 at 10:01:22PM +0100, Andrei Lepikhov wrote: > > > > I do think the underlying problem of safely exposing databases to > > > > automated agents is becoming increasingly common, so it seems like a > > > > useful area to explore. > > > > I agree the need a read-only sessions is going to get more urgent with > > MCP. Why doesn't the community code have a read-only session option > > that can't be changed? > > The pg_readonly project aims to answer this question: if it is easy and > cheap to implement as an extension, why do we need to touch the core? I think it is a fundamental feature the database should have by default. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future.