pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: A J <s5aly@yahoo.com>
To: Craig Ringer <ringerc@ringerc.id.au>
Cc: PG Admin <pgsql-admin@postgresql.org>
Subject: Re: Question on Postgres Index internals
Date: Sun, 21 Aug 2011 08:07:15 -0700 (PDT)
Message-ID: <1313939235.83661.YahooMailNeo@web120005.mail.ne1.yahoo.com> (raw)
In-Reply-To: <4E4E0573.2010508@ringerc.id.au>
References: <1313703964.54877.YahooMailNeo@web120001.mail.ne1.yahoo.com>
	<4E4E0573.2010508@ringerc.id.au>

So I assume 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 under index corruption.


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


On 19/08/2011 5:46 AM, A J wrote: 
How does Postgres detect corruption of index data files ?
If their structure doesn't make sense, they're corrupt. It doesn't actively seek or detect corruption, because it shouldn't happen, and cannot be reliably discovered if it has.

What is the exact mechanism by which it knows that the index is corrupt ?
Numerous different ways, depending on the nature of the damage and the type of index. Often it won't know the index is damaged at all.

Can it happen that part of the index is corrupt but Postgres does not realize because those specific rows are not accessed (but other rows from that table are accessed)
>
>
Yes, that is possible. It is also possible that a damaged index could cause issues like multiple instances of a value that's supposed to be unique, or a foreign key reference to a non-existent tuple.

Index corruption should not happen. If you are facing index
    corruption, either you have a hardware problem or you've hit a bug.
    The vast majority of cases are hardware faults.

Perhaps it'd help if you'd supply a little more detail about the
    background. Why you're asking this, and why you (presumably) suspect
    you have index corruption.

--
Craig  Ringer

view thread (4+ messages)  latest in thread

Message-ID: <1313939235.83661.YahooMailNeo@web120005.mail.ne1.yahoo.com>
Permalink:  ../1313939235.83661.YahooMailNeo@web120005.mail.ne1.yahoo.com/
Also on:    postgresql.org/message-id/1313939235.83661.YahooMailNeo@web120005.mail.ne1.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: s5aly@yahoo.com, ringerc@ringerc.id.au
  Subject: Re: Question on Postgres Index internals
  In-Reply-To: <1313939235.83661.YahooMailNeo@web120005.mail.ne1.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox