Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9cib-0003Za-EN for pgsql-admin@arkaria.postgresql.org; Tue, 31 Oct 2017 20:01:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e9cia-0008VH-Su for pgsql-admin@arkaria.postgresql.org; Tue, 31 Oct 2017 20:01:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e9cgl-0003Z7-QD for pgsql-admin@postgresql.org; Tue, 31 Oct 2017 19:59:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e9cgi-0005io-PZ for pgsql-admin@postgresql.org; Tue, 31 Oct 2017 19:59:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v9VJx2Hd013632; Tue, 31 Oct 2017 15:59:02 -0400 From: Tom Lane To: Arjun Ranade cc: pgsql-admin@postgresql.org Subject: Re: Missing Chunk Error when doing a VACUUM FULL operation - DB Corruption? In-reply-to: References: Comments: In-reply-to Arjun Ranade message dated "Tue, 31 Oct 2017 15:37:19 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13630.1509479942.1@sss.pgh.pa.us> Date: Tue, 31 Oct 2017 15:59:02 -0400 Message-ID: <13631.1509479942@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Arjun Ranade writes: > We had some downtime recently and I thought it would be a good idea to do a > periodic VACUUM FULL of one of our large Postgres DB's. > However, when I tried to attempt the VACUUM FULL, I saw the following error: > INFO: vacuuming "pg_catalog.pg_statistic" > vacuumdb: vacuuming of database "db1" failed: ERROR: missing chunk number > 0 for toast value 30382746 in pg_toast_2619 We hear reports like this just often enough to make it seem like there's some bug that afflicts pg_statistic specifically. Nobody's ever found a cause though. > Given that pg_statistic is inessential data (it can be rebuilt by analyzing > each table), I did a 'DELETE FROM pg_statistic;' which removed all the > rows. That would've been my advice ... > However, when I ran the VACUUM FULL again, I received the same error. ... but that's really interesting. Is this still reproducible? If you could get a stack trace from the point of the error, that might yield useful data. (Set a gdb breakpoint at "errfinish", run the VACUUM FULL, and when it stops, get the stack with "bt". Don't use VERBOSE, or you'll reach errfinish for each line of verbose output...) Also, what PG version is this exactly? regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin