Re: ERROR: could not find tuple for statistics object - is there a way to clean this up?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Morris de Oryx <morrisdeoryx(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: ERROR: could not find tuple for statistics object - is there a way to clean this up?
Date: 2020-11-15 16:34:43
Message-ID: 629440.1605458083@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Morris de Oryx <morrisdeoryx(at)gmail(dot)com> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2020-11-15 16:39:30 Re: New "function tables" in V13 documentation
Previous Message David G. Johnston 2020-11-15 16:32:29 Re: Restoring database from false update