pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: padam.tehlan@leptonsoftware.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17384: ERROR: missing chunk number 0 for toast value 152073604 in pg_toast_2619
Date: Thu, 10 Feb 2022 16:45:28 -0800
Message-ID: <20220211004528.65yrelmfpkw4wy5e@alap3.anarazel.de> (raw)
In-Reply-To: <198233.1643863841@sss.pgh.pa.us>
References: <17384-f50f2eedf541e512@postgresql.org>
	<20220203044257.GH23027@telsasoft.com>
	<198233.1643863841@sss.pgh.pa.us>

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





view thread (4+ messages)

Message-ID: <20220211004528.65yrelmfpkw4wy5e@alap3.anarazel.de>
Permalink:  ../20220211004528.65yrelmfpkw4wy5e@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20220211004528.65yrelmfpkw4wy5e@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, pryzby@telsasoft.com, padam.tehlan@leptonsoftware.com
  Subject: Re: BUG #17384: ERROR: missing chunk number 0 for toast value 152073604 in pg_toast_2619
  In-Reply-To: <20220211004528.65yrelmfpkw4wy5e@alap3.anarazel.de>
  References: <17384-f50f2eedf541e512@postgresql.org> <20220203044257.GH23027@telsasoft.com> <198233.1643863841@sss.pgh.pa.us> <20220211004528.65yrelmfpkw4wy5e@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox