Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id E260F633DBC for ; Thu, 22 Apr 2010 13:45:52 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 25546-01-3 for ; Thu, 22 Apr 2010 16:45:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f221.google.com (mail-bw0-f221.google.com [209.85.218.221]) by mail.postgresql.org (Postfix) with ESMTP id 4C9E1635AB1 for ; Thu, 22 Apr 2010 10:53:27 -0300 (ADT) Received: by bwz21 with SMTP id 21so8124953bwz.35 for ; Thu, 22 Apr 2010 06:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:received:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=M0u6gKV3hzBs71uWNvlNR35/JOF8+yViIaV05e7dZsI=; b=Boq2FMSKmcBNupLmTQ8qd/hqwe2FPWDftDSV/Uyd+k/BlOteDc7DjwwvpHxadOR/fG 0DOia27EXMSk4AhDYiB4WGLwQ2ZU6NLSRlH/8jg1NzUzw3Bap97Bg9ym27QeJBF0EKYC UXBD9CexKpoMKlrHAZU7zYm7UIQKS8mxWdJxY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=kbYn6IBFmz6qomOxgJLDu1353uQmfMIJNgcGM9moL8xbP4V1YWGgyhtsoIaJWaNPEx a3dvs1C+7MwM7XhKlOKugGe0+qus9imF8bFBwvX4+D3e+35jcic1wjtMeZ8KmSNCcAlE qAYXW8oqFzXDW9s6wxCZQUoCqVYyQ7TIDoaV4= MIME-Version: 1.0 Received: by 10.239.158.134 with HTTP; Thu, 22 Apr 2010 06:53:05 -0700 (PDT) In-Reply-To: <201004221516.08729.achill@matrix.gatewaynet.com> References: <201004221516.08729.achill@matrix.gatewaynet.com> From: =?ISO-8859-1?Q?C=E9dric_Villemain?= Date: Thu, 22 Apr 2010 15:53:05 +0200 Received: by 10.239.193.141 with SMTP id j13mr911272hbi.188.1271944405159; Thu, 22 Apr 2010 06:53:25 -0700 (PDT) Message-ID: Subject: Re: pgsql 8.3.3 "Invalid page header" leads to "FATAL: segment too big" To: Achilleas Mantzios Cc: "pgsql-admin@postgresql.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.864 tagged_above=-10 required=5 tests=AWL=0.036, BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201004/302 X-Sequence-Number: 34396 2010/4/22 Achilleas Mantzios : > Hello, > i have this serious problem in one of our remote vessels. (comm is done b= y minicom to the remote satelite modem) > I think that this server was under some sort of constant resets or hardwa= re failures. > Initially,i had this problem: > ERROR: =A0invalid page header in block 672720 of relation "pg_toast_12571= 6009" > > This toast table corresponds to a table named "mail_message", > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Table "pub= lic.mail_message" > =A0Column =A0 | =A0 =A0 =A0 Type =A0 =A0 =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 Modifiers > -----------+-------------------+-----------------------------------------= ------------------ > =A0msgno =A0 =A0 | mail_msgno_domain | not null default nextval('mail_msg= no_sequence'::regclass) > =A0msgsource | bytea =A0 =A0 =A0 =A0 =A0 =A0 | > Indexes: > =A0 =A0"mail_message_key" PRIMARY KEY, btree (msgno) > > (obviously the TOAST table serves the msgsource varlena) the contents of = which is not of vital importance. > I tried, REINDEXING, with no success, and after that, i tried resetting t= he said block on disk as per this > suggestion by Tom here: http://old.nabble.com/invalid-page-header-td11981= 154.html > > i found the oid of the table: > SELECT tableoid,1 from pg_toast.pg_toast_125716009 order by chunk_id LIMI= T 1 > =A0tableoid =A0| ?column? > -----------+---------- > =A0125716013 | =A0 =A0 =A0 =A01 > > (and just to verify) > SELECT relname from pg_class where oid=3D125716013; > =A0 =A0 =A0relname > -------------------- > =A0pg_toast_125716009 > > Then i did: (as i said i do not need the contents of msgsource - yet the = contents of msgno are vital) > dd if=3D/dev/zero of=3D/usr/local/var/lib/pgsql/data/base/125714957/12571= 6013 seek=3D672720 bs=3D8192 count=3D1 segment have 1.1GB size maximum. You have to catch in what segment the faulty block is, and reajust the block value from the error report to the real one in the good segment. > > However, after that, unfortunately i get constant postgresql server resta= rts with: > FATAL: =A0segment too big > server closed the connection unexpectedly > =A0 =A0 =A0 =A0This probably means the server terminated abnormally > =A0 =A0 =A0 =A0before or while processing the request. > The connection to the server was lost. Attempting reset: Succeeded. > > Is there anything i can do to savage the situation? > > (one of) the hard part here is that i dont have neither physical nor netw= ork access to the server > (only ultra expensive unreliable satellite comms) > > Thanks for any hints... > > -- > Achilleas Mantzios > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin > --=20 C=E9dric Villemain