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 1qLWkM-0002Ib-5b for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Jul 2023 22:31:14 +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 1qLWkK-0004rb-E7 for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Jul 2023 22:31:12 +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 1qLWkK-0004rT-4s for pgsql-hackers@lists.postgresql.org; Mon, 17 Jul 2023 22:31:12 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qLWkH-0000ia-9t for pgsql-hackers@postgresql.org; Mon, 17 Jul 2023 22:31:10 +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 36HMV4sh4092512; Mon, 17 Jul 2023 18:31:04 -0400 From: Tom Lane To: Sofia Kopikova cc: pgsql-hackers@postgresql.org Subject: Re: Add TOAST support for more system tables In-reply-to: References: Comments: In-reply-to Sofia Kopikova message dated "Tue, 18 Jul 2023 01:13:25 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4092510.1689633064.1@sss.pgh.pa.us> Date: Mon, 17 Jul 2023 18:31:04 -0400 Message-ID: <4092511.1689633064@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Sofia Kopikova writes: > This patch adds TOAST support for system tables pg_class, > pg_attribute and pg_largeobject_metadata, as they include ACL columns, > which may be potentially large in size. We have been around on this topic before, cf discussion leading up to commit 96cdeae07. Allowing toasted data in pg_class or pg_attribute seems quite scary to me because of the potential for recursive access, particularly during cache-flush scenarios. (That is, you need to be able to read those catalogs on the way to fetching a toasted value, so how can you be sure that doesn't devolve into an infinite loop?) I wonder whether we'd be better off shoving the ACL data out of these catalogs and putting it somewhere else (compare pg_attrdef). regards, tom lane