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 1wLOs9-001kyi-07 for pgsql-hackers@arkaria.postgresql.org; Fri, 08 May 2026 17:20:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wLOs7-00AVX9-2G for pgsql-hackers@arkaria.postgresql.org; Fri, 08 May 2026 17:20:19 +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 1wLOs7-00AVWy-0X for pgsql-hackers@lists.postgresql.org; Fri, 08 May 2026 17:20:19 +0000 Received: from fout-b7-smtp.messagingengine.com ([202.12.124.150]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wLOs4-00000001GFw-13X8 for pgsql-hackers@lists.postgresql.org; Fri, 08 May 2026 17:20:18 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id 5BD1E1D000BF; Fri, 8 May 2026 13:20:09 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Fri, 08 May 2026 13:20:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm1; t=1778260809; x= 1778347209; bh=tneZ8l+mDi0M1kxu0hggDvK2+dwMlV8XiX7TmHtLqMo=; b=d GEu3U6UOeh48iOcbxJRqzyEW7o1IWieYBaXPMiUkUQhCxKkxG81/10bOuNCpFCe6 /1QtSlKYSjRTXe0H1j+OGnLEm0WnmJDqM9G8a88TubjlbohcMZgmawC4vJTxKpGp WwIidx6tA2oIHBWsmQnDAOltQP1SW1wk9Bz3PdbTDMmxIv6njW9B16A4sp9CiczN KGeFa5yh/H29kudVPY/fLBcnQJ/5F7ODx8+UOSgm4EvRdmlLZZAN6LZh/zJf8rLr KzjNILmd1ipK8UiaWj8Zr6i4+pWkIzn2VlocKlXOfLrPRYVys1e8yMxoi1yNpMsF G5g9nTMo2dCA8TtuiV1CQ== 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-sender :x-me-sender:x-sasl-enc; s=fm3; t=1778260809; x=1778347209; bh=t neZ8l+mDi0M1kxu0hggDvK2+dwMlV8XiX7TmHtLqMo=; b=dcla+/tcyTxWCyEh9 7u3Hp0Ylq5RlzNStZ246QY+bjG7cYAI7O5lgZlmk3pVuIo4Ofppjy5yR+bRH1xQv NM1ln+hPhMSQSTUaZTb7xEOhiqdae1gMKi2b+eDeeoUcXaXmxYRHAjH8pQCnKGuf Bwzj2gA7+bgdAOvoguzb9rk16Qq/vlEbsF/BtHfOXT75FsF5u1HTynZiExmAjMd6 KywTOPfDgjPK7dwKWIQZuPJkPbgSUjKDrXIPlb4M1PfiC+2KLqbR2RYdAN26Ub1z 2dofPUbdOoj3KrJs1tBwQCqbLon0xPLlvUUQocsT40W7VqMap2bY0jSf9kfgaVxw o103w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdduuddtleefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheplmhlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvqeenucggtf frrghtthgvrhhnpeetuedvheffkeevgfeuheevteevkefggedttdeufeeuheduuddthfef fffhjeefffenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgv sehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtthhopeegpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopegrnhgurhgvfiesughunhhslhgrnhgvrdhnvghtpdhrtghpthht oheplhhirdgvvhgrnhdrtghhrghosehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgsh hqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhrtghp thhtohepjhhimhdrjhhonhgvshesuhhnihdqmhhuvghnshhtvghrrdguvg X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 May 2026 13:20:07 -0400 (EDT) Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 3C450B05F78; Fri, 08 May 2026 19:20:04 +0200 (CEST) Date: Fri, 8 May 2026 19:20:04 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Jim Jones Cc: Andrew Dunstan , Chao Li , PostgreSQL Hackers Subject: Re: Fix wrong error message from pg_get_tablespace_ddl() Message-ID: 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 On 2026-May-08, Jim Jones wrote: > It depends on what we expect from the error message. If its purpose is > simply to tell the user "you can't access this object," the current message > is totally fine. If, however, the goal is to show the error's root cause, it > could be a bit misleading. Hmm, the idea in my mind was that if SELECT from the catalog is revoked, but the user does have a grant on the tablespace that lets them read the DDL, then they should be able to obtain the CREATE statement for it even though they cannot read the properties from the catalog directly. The current coding does not seem to do that, but instead it refuses to produce the DDL. Is this really what we want? Although tablespaces may be special in that only superusers can "own" them anyway. TBH I'm undecided about how this should work. If somebody has ACL_CREATE on a certain tablespace, should she be able to know what the spcoptions are, for instance? What about a database owner whose default tablespace is that one? Maybe we'd hide the location unless superuser, and show the rest ...? -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "This is a foot just waiting to be shot" (Andrew Dunstan)