Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id E6F716336B3 for ; Fri, 23 Apr 2010 08:55:12 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 57420-03 for ; Fri, 23 Apr 2010 11:55:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by mail.postgresql.org (Postfix) with ESMTP id 742816331C8 for ; Fri, 23 Apr 2010 08:54:46 -0300 (ADT) Received: from smadev.internal.net (localhost [127.0.0.1]) by smadev.internal.net (8.14.2/8.14.2) with ESMTP id o3NBsiba038216 for ; Fri, 23 Apr 2010 14:54:44 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.14.2/8.14.2/Submit) id o3NBshsO038215 for pgsql-admin@postgresql.org; Fri, 23 Apr 2010 14:54:43 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: pgsql-admin@postgresql.org Subject: pg_dump: Error message from server: ERROR: compressed data is corrupt Date: Fri, 23 Apr 2010 13:54:42 +0200 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <201004231454.43104.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.001 tagged_above=-10 required=5 tests=BAYES_20=-0.001 X-Spam-Level: X-Archive-Number: 201004/315 X-Sequence-Number: 34409 Hello, just coming back from a rescue marathon on this remote server i was telling= you. As i said, the last problem was while doing a=20 pg_dump dynacom=20 (dynacom is my db'd name) i kept getting=20 pg_dump: SQL command failed pg_dump: Error message from server: ERROR: compressed data is corrupt pg_dump: The command was: COPY public.mail_entity (msgno, entno, entparentn= o.... so i tried dumping the individual mail_entity table, which resulted in the = following errors: pg_dump -t mail_entity > /dev/null pg_dump: SQL command failed pg_dump: Error message from server: ERROR: missing chunk number 2 for toas= t value 133502683 pg_dump: The command was: COPY public.mail_entity (msgno, entno, entparentn= o, entdate, entrecvdate, entsendername, entsenderaddr, entmess ageid, en; srv:~> =46rom the 76000 rows in that table i found the damaged columns by using th= e following technique=20 (which requires O(log(n)) selects btw lol!!!) SELECT msgno,entno,entdate from mail_entity where coalesce(entdata::text,''= )||coalesce(enttext,'') like '%foo%' and msgno/10000 =3D 0; SELECT msgno,entno,entdate from mail_entity where coalesce(entdata::text,''= )||coalesce(enttext,'') like '%foo%' and msgno/10000 =3D 1; =2E... until i found the correct subset of 10000 rows SELECT msgno,entno,entdate from mail_entity where coalesce(entdata::text,''= )||coalesce(enttext,'') like '%foo%' and msgno/10000 =3D 7; then SELECT msgno,entno,entdate from mail_entity where coalesce(entdata::text,''= )||coalesce(enttext,'') like '%foo%' and msgno/1000 =3D 70; SELECT msgno,entno,entdate from mail_entity where coalesce(entdata::text,''= )||coalesce(enttext,'') like '%foo%' and msgno/1000 =3D 71; =2E.. and so on untill i found the two (it was two of them) bad rows. i did entdata=3D'' for those two rows, and the selects could be done withou= t issues. however, after that, the pg_dump -t reverted back to the aforementioned err= or. Now doing this gives: srv:~> pg_dump -t mail_entity > /dev/null pg_dump: SQL command failed pg_dump: Error message from server: ERROR: compressed data is corrupt pg_dump: The command was: COPY public.mail_entity (msgno, entno, entparentn= o, entdate, entrecvdate, entsendername, entsenderaddr, entmessageid, en; srv:~> =20 Then i did # CREATE TABLE mail_entity2 AS SELECT * FROM mail_entity; which went fine but, for some crazy reason, pg_dump on mail_entity2 also results to an erro= r: srv:~> pg_dump -t mail_entity2 > /dev/null pg_dump: SQL command failed pg_dump: Error message from server: ERROR: compressed data is corrupt pg_dump: The command was: COPY public.mail_entity2 (msgno, entno, entparent= no, entdate, entrecvdate, entsendername, entsenderaddr, entmessageid, e; srv:~> =20 Is there anything i could do to take this very much wanted dump? =2D-=20 Achilleas Mantzios