Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 660ABB5DBF6 for ; Fri, 19 Aug 2011 17:28:06 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 15775-01 for ; Fri, 19 Aug 2011 20:27:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from powerexchange.power-soft.net (rx0cv-power-soft.gv.bigpipeinc.com [64.251.72.74]) by mail.postgresql.org (Postfix) with ESMTP id 7DBACB5DBF7 for ; Fri, 19 Aug 2011 17:27:58 -0300 (ADT) Received: from [192.168.0.66] (192.168.0.66) by powerexchange.power-soft.net (192.168.0.24) with Microsoft SMTP Server (TLS) id 14.0.722.0; Fri, 19 Aug 2011 13:27:57 -0700 Subject: Re: (pgsql8.4) DATA Corruption MIME-Version: 1.0 (Apple Message framework v1244.3) Content-Type: multipart/alternative; boundary="Apple-Mail=_2C4AD8AC-5813-4728-88C2-7EC43C30F0A0" From: Mik Rose In-Reply-To: Date: Fri, 19 Aug 2011 13:27:57 -0700 CC: "pgsql-sql@postgresql.org" Message-ID: <0F87A7E6-6BF1-43BF-9299-BD94E28547FB@power-soft.com> References: To: Scott Marlowe X-Mailer: Apple Mail (2.1244.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-5 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201108/77 X-Sequence-Number: 35745 --Apple-Mail=_2C4AD8AC-5813-4728-88C2-7EC43C30F0A0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Thanks for the suggestions Scott. I was looking at the zero_damage_page option and enabled it in my = postgres.conf. I saw that it detected bad pages and zero'd them out = during a number of reindex and a vacuum's. Now when i reindex though, I am getting this error. NOTICE: table "pg_foreign_server" was reindexedERROR: could not create = unique index "pg_toast_57366_index" DETAIL: Table contains duplicated values. ERROR: could not create unique index "pg_toast_57366_index" DETAIL: Table contains duplicated values. On 2011-08-19, at 1:02 PM, Scott Marlowe wrote: > On Fri, Aug 19, 2011 at 1:08 PM, Mikola Rose = wrote: >> Happy Friday people! >>=20 >>=20 >>=20 >> I was wondering if anyone had any suggestions on how to resolve this >> issue... I am moving otrs to another server and during the backup = process I >> am running into this error >>=20 >> pg_dump: dumping contents of table article_attachment >>=20 >>=20 >>=20 >>=20 >>=20 >> pg_dump: SQL command failed >>=20 >> pg_dump: Error message from server: ERROR: unexpected chunk number 7 >> (expected 6) for toast value 77281 in pg_toast_57366 >>=20 >>=20 >>=20 >>=20 >>=20 >> pg_dump: The command was: COPY public.article_attachment (id, = article_id, >> filename, content_size, content_type, content, create_time, = create_by, >> change_time, change_by, content_id, content_alternative) TO stdout; >>=20 >>=20 >>=20 >>=20 >>=20 >> pg_dump: *** aborted because of error >>=20 >>=20 >>=20 >>=20 >>=20 >> I have tried a vacuum and reindex with no successes. >=20 > You'll likely have to figure which blocks are corrupted, and copy out > the good data using a where clause the excludes it, then get what you > can out of it, truncate the table, and reinsert the data. >=20 > Then figure out what part of your hardware is / might be dodgy. mem > test, disk check, etc. --Apple-Mail=_2C4AD8AC-5813-4728-88C2-7EC43C30F0A0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="iso-8859-1" NOTICE:  table "pg_foreign_server" was = reindexedERROR:  could not create unique index = "pg_toast_57366_index"
DETAIL:  Table contains duplicated = values.

ERROR:  could not create unique index = "pg_toast_57366_index"
DETAIL:  Table contains duplicated = values.

On 2011-08-19, at = 1:02 PM, Scott Marlowe wrote:

On = Fri, Aug 19, 2011 at 1:08 PM, Mikola Rose <mrose@power-soft.com> = wrote:
Happy Friday = people!



I was wondering = if anyone had any suggestions on how to resolve = this
issue...  I am = moving otrs to another server and during the backup process = I
am running into this = error

pg_dump: = dumping contents of table article_attachment





pg_dump: SQL = command failed

pg_dump: Error = message from server: ERROR:  unexpected chunk number = 7
(expected 6) for toast value = 77281 in pg_toast_57366





pg_dump: The = command was: COPY public.article_attachment (id, = article_id,
filename, = content_size, content_type, content, create_time, = create_by,
change_time, = change_by, content_id, content_alternative) TO = stdout;





pg_dump: *** = aborted because of error





I have tried a = vacuum and reindex with no successes.

You'll likely = have to figure which blocks are corrupted, and copy out
the good data = using a where clause the excludes it, then get what you
can out of = it, truncate the table, and reinsert the data.

Then figure out = what part of your hardware is / might be dodgy.  mem
test, disk = check, etc.

= --Apple-Mail=_2C4AD8AC-5813-4728-88C2-7EC43C30F0A0--