Re: postgres=# VACUUM FULL pg_statistic => ERROR: missing chunk number 0 for toast value .. in pg_toast_2619

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: postgres=# VACUUM FULL pg_statistic => ERROR: missing chunk number 0 for toast value .. in pg_toast_2619
Date: 2018-05-19 18:39:26
Message-ID: 25190.1526755166@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Justin Pryzby <pryzby(at)telsasoft(dot)com> writes:
> [pryzbyj(at)database ~]$ while :; do for db in `psql postgres -Atc "SELECT datname FROM pg_database WHERE datallowconn"`; do for t in pg_statistic pg_attrdef pg_constraint; do echo "$db.$t..."; PGOPTIONS=-cstatement_timeout='9s' psql $db -qc "VACUUM FULL $t"; done; done; done

> ...
> postgres.pg_statistic...
> postgres.pg_attrdef...
> postgres.pg_constraint...
> template1.pg_statistic...
> template1.pg_attrdef...
> template1.pg_constraint...
> ts.pg_statistic...
> ERROR: canceling statement due to statement timeout
> ts.pg_attrdef...
> ts.pg_constraint...
> postgres.pg_statistic...
> ERROR: missing chunk number 0 for toast value 3372855171 in pg_toast_2619

Hm, so was the timeout error happening every time through on that table,
or just occasionally, or did you provoke it somehow? I'm wondering how
your 9s timeout relates to the expected completion time.

I don't have any test DBs with anywhere near large enough stats to
require 9s to vacuum pg_statistic, but I'm trying this with a
much-reduced value of statement_timeout, and so far no failures ...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Nolan 2018-05-19 19:10:29 initdb failing (10.4 centos7)
Previous Message David G. Johnston 2018-05-19 17:01:18 Re: View Filtered Rows technique