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 1txUdS-00ACUk-3h for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Mar 2025 17:33:50 +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 1txUdQ-007OfV-KU for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Mar 2025 17:33:48 +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 1txUdQ-007OfN-9t for pgsql-bugs@lists.postgresql.org; Wed, 26 Mar 2025 17:33:48 +0000 Received: from fhigh-a5-smtp.messagingengine.com ([103.168.172.156]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1txUdO-001HUh-1O for pgsql-bugs@lists.postgresql.org; Wed, 26 Mar 2025 17:33:47 +0000 Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfhigh.phl.internal (Postfix) with ESMTP id 8C42D1140167; Wed, 26 Mar 2025 13:33:45 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-07.internal (MEProxy); Wed, 26 Mar 2025 13:33:45 -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-sender :x-me-sender:x-sasl-enc; s=fm2; t=1743010425; x=1743096825; bh=u fy3DfUb1SQqzLlUW9HLqRI6XcOjUGcLcxVadXWGfro=; b=wma8M8E7Wq6L0V9uB hd9tynnL0f7Lu7TvuruUWAvdueUsgLNzVRRQM6m/awBigCZ7+2mK8TQBiQNo2LB0 cTkS6H137y5SDZSdWCp0OcO90NyCwfJaEExv4A/1c6nrCgJj+bZf6mRMpfdxrL0H xYO6PLvGsSd1PyFegfyYC9YWo1XactGEmXr4a+Q4JkzagdVWNhGV1TxIwy8Vozi+ ClC6JjGrfgir5G4R2pT4FN4yz0uQTRrcULeo6+lDPZqNoI5fyMwTYvQE51YNb3GK fHzWJQTKZMPW0wHv+mm8ysyQqJC0YmA5kEuzswrhf74ig2nLMDCughQ12rPoZhlK tjgHg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduieeiudegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepfffhvfevuffkgggtugfgjgesthekredttddt jeenucfhrhhomheplmhlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlh hvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepvdehueffhefgueekueef heehgffhuefgfedukeejveduffegffekgeffffevgeehnecuffhomhgrihhnpegvnhhtvg hrphhrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhnsg gprhgtphhtthhopeeipdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegvuhhlvghr segvuhhlvghrthhordgtohhmpdhrtghpthhtohepthhhrghrrghkrghnsehgmhgrihhlrd gtohhmpdhrtghpthhtohepthhnughrfigrnhhgsehgmhgrihhlrdgtohhmpdhrtghpthht ohephhhlihhnnhgrkhgrsehikhhirdhfihdprhgtphhtthhopehpghhsqhhlqdgsuhhgsh eslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepthhglhesshhs shdrphhghhdrphgrrdhush X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 26 Mar 2025 13:33:44 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1743010422; bh=AhNVHQqtlJpokFoJgPOtHVq6EdSq75v1LA9VqvaJq9A=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=ZIQa7GnM35JWQzdx4QaJBbv6oy3qc6L7sINHU9sYCt0HO6yqyHRXMj+Cyc3dL1Ur1 1QYp+RB2wQgkT1kr6TicW5eAMCs3H+E4Jn6nQtnP7GlihzlLt2jJq/cRQIEAVvtP68 z3zEb2c4wAiIena8aFkjZTEQMBAirjQLkYk0HTsQduJNvGzhvBmOngQbLMZp9gtcih f0WEolbpXBtWnFqH9v3EwwGuSXCGTv2KVDoJ+WbjMu3TpMNieIyRx2FNEGRxlszsCu a1Dg74ezfYY0lJR66rFYOOmgt+ihyF/NlQ3mXURQ53XtO79ShtZyZ3PZBWhnS3YdTq ncxtPTpY9uVLg== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 20C3385; Wed, 26 Mar 2025 18:33:42 +0100 (CET) Date: Wed, 26 Mar 2025 18:33:42 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Euler Taveira Cc: Tender Wang , Tom Lane , tharakan@gmail.com, pgsql-bugs@lists.postgresql.org, Heikki Linnakangas Subject: Re: BUG #18866: Running pg_freespace() on views triggers an Abort Message-ID: <202503261733.mcrnkm6myu6y@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 On 2025-Mar-25, Euler Taveira wrote: > On Tue, Mar 25, 2025, at 10:18 PM, Tender Wang wrote: > > Thanks for the advice. Please see the attached patch. > > Your patch needs some adjustments. There is no need to include pg_class.h. I think including pg_class.h (which is where RELKIND_HAS_STORAGE() is defined and where errdetail_relkind_not_supported is declared) is better than including utils/rel.h, which brings in a whole bunch of additional stuff in addition to pg_class.h :-) -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end." (2nd Commandment for C programmers)