Re: BUG #17384: ERROR: missing chunk number 0 for toast value 152073604 in pg_toast_2619

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, padam(dot)tehlan(at)leptonsoftware(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17384: ERROR: missing chunk number 0 for toast value 152073604 in pg_toast_2619
Date: 2022-02-11 00:45:28
Message-ID: 20220211004528.65yrelmfpkw4wy5e@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On 2022-02-02 23:50:41 -0500, Tom Lane wrote:
> (I say "just" truncate pg_statistic, but you'll have to do that
> in a standalone backend started with the -O option, else there
> are permissions checks that will prevent it.)

FWIW, in recent releases you can set allow_system_table_mods to on as a
superuser.

postgres[62458][1]=# TRUNCATE pg_statistic;
ERROR: 42501: permission denied: "pg_statistic" is a system catalog
LOCATION: truncate_check_rel, tablecmds.c:2159
postgres[62458][1]=# SET allow_system_table_mods = true;
SET
Time: 0.548 ms
postgres[62458][1]=# TRUNCATE pg_statistic;
TRUNCATE TABLE
postgres[62458][1]=# RESET allow_system_table_mods;
RESET

> The bad news is that there might be more corruption lurking
> elsewhere. What event precipitated this?
>
> I think we have seen some bugs that would preferentially affect
> pg_statistic, but not recently. If you're not running a current
> minor release, an update is advisable.

Yea, hard to point somewhere concretely without more details.

Greetings,

Andres Freund

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2022-02-11 01:10:25 Re: BUG #17391: While using --with-ssl=openssl and PG_TEST_EXTRA='ssl' options, SSL tests fail on OpenBSD 7.0
Previous Message Tom Lane 2022-02-11 00:44:57 Re: BUG #17391: While using --with-ssl=openssl and PG_TEST_EXTRA='ssl' options, SSL tests fail on OpenBSD 7.0