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 1tk94v-000avv-PD for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Feb 2025 21:55:01 +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 1tk94t-003mgo-Uq for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Feb 2025 21:54:59 +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 1tk94t-003mfp-KZ for pgsql-hackers@lists.postgresql.org; Mon, 17 Feb 2025 21:54:59 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tk94r-001OVS-2q for pgsql-hackers@postgresql.org; Mon, 17 Feb 2025 21:54:58 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 51HLsu8J933434; Mon, 17 Feb 2025 16:54:56 -0500 From: Tom Lane To: Nathan Bossart cc: Dean Rasheed , pgsql-hackers@postgresql.org Subject: Re: revamp row-security tracking In-reply-to: References: <853593.1739815709@sss.pgh.pa.us> Comments: In-reply-to Nathan Bossart message dated "Mon, 17 Feb 2025 15:42:44 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <933432.1739829296.1@sss.pgh.pa.us> Date: Mon, 17 Feb 2025 16:54:56 -0500 Message-ID: <933433.1739829296@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > Perhaps another variation > on this idea is to create a query walker that just looks for hasRowSecurity > flags throughout the tree (and to use that to mark the plan cache entry > appropriately). That seems like a pretty plausible compromise position. So we'd redefine Query.hasRowSecurity as summarizing the situation for only the Query's own rtable entries, not recursively for sub-Queries. regards, tom lane