Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2ya9-0005wL-71 for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Jan 2021 15:42:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l2ya8-0000kO-48 for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Jan 2021 15:42:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2ya7-0000kH-To for pgsql-hackers@lists.postgresql.org; Fri, 22 Jan 2021 15:42:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2ya5-00047E-Tn for pgsql-hackers@postgresql.org; Fri, 22 Jan 2021 15:42:38 +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 10MFgXka1154910; Fri, 22 Jan 2021 10:42:34 -0500 From: Tom Lane To: "Joel Jacobson" cc: "Peter Eisentraut" , pgsql-hackers Subject: Re: Add primary keys to system catalogs In-reply-to: <7512e697-baad-4471-a3c0-93a0114ea07f@www.fastmail.com> References: <348f3158-bf7e-c5f0-f33b-9e552e3d5481@2ndquadrant.com> <266949.1610921277@sss.pgh.pa.us> <4b5a1272-b6ea-d2e0-9b8f-3bec20109eb5@2ndquadrant.com> <906053.1611249356@sss.pgh.pa.us> <7512e697-baad-4471-a3c0-93a0114ea07f@www.fastmail.com> Comments: In-reply-to "Joel Jacobson" message dated "Fri, 22 Jan 2021 09:47:28 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1154908.1611330153.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 22 Jan 2021 10:42:33 -0500 Message-ID: <1154909.1611330153@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Joel Jacobson" writes: > I ran this query (on a patched database) to see if there are still any c= atalog tables without primary keys: > ... > pg_depend > pg_shdepend Yeah, this is noted in the patch's own regression tests. > Wouldn't it be possible to add primary keys to these two as well? Neither of the existing indexes is suitable, not being unique. We could imagine adding a unique index across the whole column set, but that would be an awfully large price to pay for neatnik-ism. Also, at least for pg_depend (less sure about pg_shdepend), some code cleanup would be required, because I don't think that we try very hard to avoid making duplicate dependency entries. On the whole I feel this'd be counterproductive. regards, tom lane