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 1keKzK-0000Vm-Kh for pgsql-general@arkaria.postgresql.org; Sun, 15 Nov 2020 16:34:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1keKzJ-00007j-J5 for pgsql-general@arkaria.postgresql.org; Sun, 15 Nov 2020 16:34:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1keKzJ-00007c-BO for pgsql-general@lists.postgresql.org; Sun, 15 Nov 2020 16:34:49 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1keKzH-00057j-2V for pgsql-general@postgresql.org; Sun, 15 Nov 2020 16:34:49 +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 0AFGYh0a629441; Sun, 15 Nov 2020 11:34:43 -0500 From: Tom Lane To: Morris de Oryx cc: pgsql-general Subject: Re: ERROR: could not find tuple for statistics object - is there a way to clean this up? In-reply-to: References: <606867.1605424106@sss.pgh.pa.us> Comments: In-reply-to Morris de Oryx message dated "Sun, 15 Nov 2020 20:02:20 +1100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <629439.1605458083.1@sss.pgh.pa.us> Date: Sun, 15 Nov 2020 11:34:43 -0500 Message-ID: <629440.1605458083@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Morris de Oryx writes: > After posting, I realized that this is likely a Stupid User Error. I was > mucking around, and did something along the lines of > delete from pg_statistic_ext; > or > delete from pg_stats_ext; > ...instead of DROP STATISTICS calls. Would this likely explain what I'm > seeing? Ah, yeah, it likely would. If this isn't a throwaway database, what you'd have to do to clear the errors is to find and remove the now-dangling links to the deleted objects in pg_depend. regards, tom lane