Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 01696B5DBCB for ; Sun, 21 Aug 2011 12:07:24 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 43923-02 for ; Sun, 21 Aug 2011 15:07:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nm3-vm0.bullet.mail.ne1.yahoo.com (nm3-vm0.bullet.mail.ne1.yahoo.com [98.138.91.55]) by mail.postgresql.org (Postfix) with SMTP id 03C58B5DBC6 for ; Sun, 21 Aug 2011 12:07:16 -0300 (ADT) Received: from [98.138.90.48] by nm3.bullet.mail.ne1.yahoo.com with NNFMP; 21 Aug 2011 15:07:15 -0000 Received: from [98.138.87.5] by tm1.bullet.mail.ne1.yahoo.com with NNFMP; 21 Aug 2011 15:07:15 -0000 Received: from [127.0.0.1] by omp1005.mail.ne1.yahoo.com with NNFMP; 21 Aug 2011 15:07:15 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 416178.82148.bm@omp1005.mail.ne1.yahoo.com Received: (qmail 87407 invoked by uid 60001); 21 Aug 2011 15:07:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1313939235; bh=Ss+jLFmrfq/C1dtEBmo8PB4v2QoVwsYWikLXxvSYtz8=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=CHUqd4WgfMbzssd0JZ31Rl9MMjpG7jLgryrw4J2bLKw035b3hrB0d8QRaXdZxDopLlXh4al5i69HX2V2C2MJAa/UZigC6h9v5SMgigCS894Qtw+hww2S1tTpqhyMqeOhy2bPNtqxdUjzzn4od7u4eQmBdILG6TLaGTwjHh9Kc8c= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=I6h7/V0KP/Tn8yr97f5H2japRgKge77KHOOTSARsWtrUNFD84Gfjk1+zC83JBLc1BNurWk+aFuD0KTuUJXz5fmlOMCTRGQm4XzNOTPlSlBKzxkTJezJ44RkbSYiA+AmSzgtId5taXgEN7uWABh4taFDxfW7UVnSaFwVcmpzP20w=; X-YMail-OSG: yLePQoAVM1lOtDWzaljU_mIg.iKe0NAFsO7n_NiO2QgSd12 X66mDKQvt4b1Gq8u1Ai5gxa.pqACoUrVZ7uVcA8P9FR88itZNFkCLD0QvKIP cPOoEkcGqZoMpgHoCugk1f6adOQevAD0mReWevtxPP.yF11iGUr6dp9OXsgj I7eq_j4_XOkPXlIpbfNVdX8.PQIFFUAD0zo0MqL7Gy4aaAUy3jqHfx9INYSh HynGfeggYexm8kQBmm0ckL8BhBUUGUNHw35gi6em81GWhcpF1pdMUCwa7TuB 1yN0iGxzRgOZFXEA_2IXsUXlzHOBWNiG0Bc2NRX0cBuiIoL7xuT9vYWDbtbs Y562ofnuPHSh9h8uoiROCYSz8JbljOA-- Received: from [68.36.212.155] by web120005.mail.ne1.yahoo.com via HTTP; Sun, 21 Aug 2011 08:07:15 PDT X-Mailer: YahooMailWebService/0.8.113.315625 References: <1313703964.54877.YahooMailNeo@web120001.mail.ne1.yahoo.com> <4E4E0573.2010508@ringerc.id.au> Message-ID: <1313939235.83661.YahooMailNeo@web120005.mail.ne1.yahoo.com> Date: Sun, 21 Aug 2011 08:07:15 -0700 (PDT) From: A J Reply-To: A J Subject: Re: Question on Postgres Index internals To: Craig Ringer Cc: PG Admin In-Reply-To: <4E4E0573.2010508@ringerc.id.au> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="737196383-825812127-1313939235=:83661" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.946 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-1.048 X-Spam-Level: X-Archive-Number: 201108/189 X-Sequence-Number: 38176 --737196383-825812127-1313939235=:83661 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable So I assume there is no redundant information stored such as checksum to va= lidate the files against the stored checksums.=0AI don't have an active iss= ue. Just trying to understand in detail how Postgres behaves under index co= rruption.=0A=0A=0A________________________________=0AFrom: Craig Ringer =0ATo: A J =0ACc: PG Admin =0ASent: Friday, August 19, 2011 2:40 AM=0ASubject: Re: [A= DMIN] Question on Postgres Index internals=0A=0A=0AOn 19/08/2011 5:46 AM, A= J wrote: =0AHow does Postgres detect corruption of index data files ?=0AIf= their structure doesn't make sense, they're corrupt. It doesn't actively s= eek or detect corruption, because it shouldn't happen, and cannot be reliab= ly discovered if it has.=0A=0AWhat is the exact mechanism by which it knows= that the index is corrupt ?=0ANumerous different ways, depending on the na= ture of the damage and the type of index. Often it won't know the index is = damaged at all.=0A=0ACan it happen that part of the index is corrupt but Po= stgres does not realize because those specific rows are not accessed (but o= ther rows from that table are accessed)=0A>=0A>=0AYes, that is possible. It= is also possible that a damaged index could cause issues like multiple ins= tances of a value that's supposed to be unique, or a foreign key reference = to a non-existent tuple.=0A=0AIndex corruption should not happen. If you ar= e facing index=0A corruption, either you have a hardware problem or you'= ve hit a bug.=0A The vast majority of cases are hardware faults.=0A=0APe= rhaps it'd help if you'd supply a little more detail about the=0A backgr= ound. Why you're asking this, and why you (presumably) suspect=0A you ha= ve index corruption.=0A=0A--=0ACraig=A0 Ringer --737196383-825812127-1313939235=:83661 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
So I assum= e there is no redundant information stored such as checksum to validate the= files against the stored checksums.
I don't have an= active issue. Just trying to understand in detail how Postgres behaves und= er index corruption.


From: Craig Ringer <ringerc@ringerc.id.au><= br>To: A J <s5aly@yahoo= .com>
Cc: PG Admin &= lt;pgsql-admin@postgresql.org>
Sent: Friday, August 19, 2011 2:40 AM
Subject: Re: [ADMIN] Question on Postgre= s Index internals

=0A =0A=0A =0A =0A =0A O= n 19/08/2011 5:46 AM, A J wrote:=0A
=0A <= div style=3D"color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); fon= t-size: 12pt; font-family: 'times new roman', 'new york', times, serif; ">= =0A
How does Postgres detect corruption of index data files ?=0A
=0A
=0A If their structure doesn't ma= ke sense, they're corrupt. It doesn't=0A actively seek or detect corrupt= ion, because it shouldn't happen, and=0A cannot be reliably discovered i= f it has.
=0A
=0A
=0A
Wha= t is the exact mechanism by which it knows that the=0A index is co= rrupt ?
=0A
=0A
=0A Numerous different w= ays, depending on the nature of the damage and=0A the type of index. Oft= en it won't know the index is damaged at all.
=0A
=0A
=0A
Can it happen that part of the index is co= rrupt but=0A Postgres does not realize because those specific rows= are not=0A accessed (but other rows from that table are accessed)=
=0A

=0A
=0A
=0A =0A Yes, that is possible. It is also possible that a damaged index= =0A could cause issues like multiple instances of a value that's=0A s= upposed to be unique, or a foreign key reference to a non-existent=0A tu= ple.
=0A
=0A Index corruption should not happen. If you are fa= cing index=0A corruption, either you have a hardware problem or you've h= it a bug.=0A The vast majority of cases are hardware faults.
=0A <= br>=0A Perhaps it'd help if you'd supply a little more detail about the= =0A background. Why you're asking this, and why you (presumably) suspect= =0A you have index corruption.
=0A
=0A --
=0A Craig&n= bsp; Ringer
=0A =0A=0A


--737196383-825812127-1313939235=:83661--