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 1sslL1-00Ai3j-Ba for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Sep 2024 15:51:00 +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 1sslL0-00BYKi-AN for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Sep 2024 15:50:58 +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.94.2) (envelope-from ) id 1sslKz-00BYKQ-OG for pgsql-hackers@lists.postgresql.org; Mon, 23 Sep 2024 15:50:58 +0000 Received: from fout-a7-smtp.messagingengine.com ([103.168.172.150]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sslKx-000fZo-6I for pgsql-hackers@postgresql.org; Mon, 23 Sep 2024 15:50:56 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id 0A8BD1380154; Mon, 23 Sep 2024 11:50:54 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Mon, 23 Sep 2024 11:50:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1727106654; x= 1727193054; bh=pJEmwMHrj8AcctTZIAqrhyR7Mj5wd5rsA7dmHyu8lZg=; b=h hUAABs/bJfHM7QgYd19yHnQVbVrwAKIbft9E+7cEdsuymZe8yqRTp1gMp8ZqehCv 9ceF/czNfQvrU4tYe7h1GlRXNoG2GtXtkdzo9soG7UPCkr3fg1sWEQT1NXdF4OmG 8ulRcm4R6vFu5rip9b2t51A58sCZ61yCrOGT1GLML1C0Lirqybol8A0GtjEZEWiE 4clp+26wvAnzG2WdtdHin4Ee7mR1vPSJm0oU16Tb/EC4+dSHTNe3L572wK1qwl3J 0d1OrsIlAW7UCd655RNxZhc3ODFLHqtHibnhyTXnOcsFKUorXFjBc6ia236Ac/Sl 7jB8TNkPaWzQnQk+viALw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudelledgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeen ucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhh drnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepueeigfffueektdfgteeuuefg tedvueehgfehleefheeljeelfeffjedttdekvdejnecuffhomhgrihhnpehpohhsthhgrh drvghspdgvnhhtvghrphhrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqih hprdhorhhgpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphht thhopehmrghgnhhushdrhhholhhmghhrvghnsehmihhlihgvnhhtshhofhhtfigrrhgvrd gtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvghsqhhl rdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 23 Sep 2024 11:50:53 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1727106649; bh=Nuy+6aClgmRKarx74a3jYjgByUfQNtHQzA6oHYDRwgs=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Usszej+TU5VZIqLLOIrZ7GLx/LSR5FjAFzcVinhEIt5bP7Ypp/g7UYWPOoRuort+B Flu+XWEET8WKnZ8bzZ6nZQIjcdZZx5mkg9qO+tLift7NWBh46wQLOitNguv+9H3qfT cVd/kULBD97a/qWvofrLVLVZdKlivBFJ1AZjIW0GZzy5uMcbcoN82GjKIR8fEi3aKS LUOIh5+3MXThtZTITGLAcNb+muChZevlQzkfqPBhekw0iQVov7BIKTQa1m+f6LTFAG cVPAKRH6G/XFrn5ISKwmBfwK+xGhN28qHdWCwT0CmgcDYrwm1q1DRQ4d0DKL56Yfr5 afjePGIc0rh8g== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id CB8C4D5; Mon, 23 Sep 2024 17:50:49 +0200 (CEST) Date: Mon, 23 Sep 2024 17:50:49 +0200 From: Alvaro Herrera To: Magnus Holmgren Cc: "pgsql-hackers@postgresql.org" Subject: Re: restrict_nonsystem_relation_kind led to regression (kinda) Message-ID: <202409231550.kxakjf6y2ykq@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Magnus, On 2024-Sep-23, Magnus Holmgren wrote: > We've set allow_system_table_mods = on so that we could rename > pg_database and in its place put a custom view that only lists the > databases the current user has CONNECT privileges to. This is because > 1) we allow customers direct (read only) access to their databases, but > 2) we don't want them to see the other customers, and 3) restricting > access to pg_database altogether leads to the GUIs the customers use > spamming error messages because they expect pg_database to be readable, > and that makes the customers (or their consultants) annoyed. Your use case and problem seem to match bug report #18604 almost exactly: https://postgr.es/m/18604-04d64b68e981ced6@postgresql.org I suggest to read that discussion, as it contains useful information. As I understand, you're only really safe (not just theatrically safe) by giving each customer a separate Postgres instance. Regards -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/