Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 11D872E0030 for ; Fri, 20 Jun 2008 14:05:10 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 54981-04 for ; Fri, 20 Jun 2008 14:05:00 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.int.journyx.com (mail.journyx.com [66.219.41.227]) by developer.postgresql.org (Postfix) with ESMTP id C03C82E0039 for ; Fri, 20 Jun 2008 14:05:01 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.int.journyx.com (Postfix) with ESMTP id 7A2EC3E20F2 for ; Fri, 20 Jun 2008 12:04:59 -0500 (CDT) X-Virus-Scanned: amavisd-new at Received: from mail.int.journyx.com ([127.0.0.1]) by localhost (mail.int.journyx.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EeYfEt70so2z for ; Fri, 20 Jun 2008 12:04:58 -0500 (CDT) Received: from whitneys (dhcp-100-201.int.journyx.com [192.168.100.201]) by mail.int.journyx.com (Postfix) with ESMTP id 1D3AD3E2160 for ; Fri, 20 Jun 2008 12:04:58 -0500 (CDT) From: "Scott Whitney" To: Subject: Re: Missing chunks from my toast... Date: Fri, 20 Jun 2008 12:08:13 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 Thread-Index: AcjS9HUwK1f8jxZhR0Ow27IrjzEDaAAAr6nA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 In-Reply-To: <20568.1213980055@sss.pgh.pa.us> Message-Id: <20080620170458.1D3AD3E2160@mail.int.journyx.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/185 X-Sequence-Number: 29523 Tom, Thanks. Here's the output of what just happened: rt3=# select reltoastrelid::regclass from pg_class where relname = 'attachments'; reltoastrelid --------------------------- pg_toast.pg_toast_8507627 (1 row) rt3=# reindex table pg_toast.pg_toast_8507627; REINDEX rt3=# \q -bash-2.05b$ pg_dump rt3 > /tmp/rt3 pg_dump: ERROR: missing chunk number 0 for toast value 110439697 pg_dump: SQL command to dump the contents of table "attachments" failed: PQendcopy() failed. pg_dump: Error message from server: ERROR: missing chunk number 0 for toast value 110439697 pg_dump: The command was: COPY public.attachments (id, transactionid, parent, messageid, subject, filename, contenttype, contentencoding, content, headers, creator, created) TO stdout; Any way to get this bad boy to backup? -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Jun 20, 2008 11:41 AM To: Scott Whitney Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Missing chunks from my toast... "Scott Whitney" writes: > There goes my breakfast... > pg_dump: ERROR: missing chunk number 0 for toast value 110439697 > pg_dump: SQL command to dump the contents of table "attachments" failed: > PQendcopy() failed. > pg_dump: Error message from server: ERROR: missing chunk number 0 for toast > value 110439697 > pg_dump: The command was: COPY public.attachments (id, transactionid, > parent, messageid, subject, filename, contenttype, contentencoding, content, > headers, creator, created) TO stdout; > I've tried reindexing this table (attachments), to no avail. You forgot the attachments, but did you reindex the table itself, or its toast table? The former cannot fix this, the latter might possibly. Easiest way to get the toast table name is select reltoastrelid::regclass from pg_class where relname = 'mytable'; (if you've got more than one table with the same name, obviously you need to add a condition on schema as well). You'll probably need to be superuser to reindex it. regards, tom lane