From: Craig Ringer <ringerc@ringerc.id.au>
To: A J <s5aly@yahoo.com>
Cc: PG Admin <pgsql-admin@postgresql.org>
Subject: Re: Question on Postgres Index internals
Date: Fri, 26 Aug 2011 12:14:25 +0800
Message-ID: <4E571DA1.9000206@ringerc.id.au> (raw)
In-Reply-To: <1313939235.83661.YahooMailNeo@web120005.mail.ne1.yahoo.com>
References: <1313703964.54877.YahooMailNeo@web120001.mail.ne1.yahoo.com>
<4E4E0573.2010508@ringerc.id.au>
<1313939235.83661.YahooMailNeo@web120005.mail.ne1.yahoo.com>
On 21/08/2011 11:07 PM, A J wrote:
> So I assume there is no redundant information stored such as checksum
> to validate the files against the stored checksums.
Nope, there are no checksums.
It's the storage subsystem's job to make sure it doesn't mangle data on
disk and reads the data as it was written. It's the OS's job to make
sure nobody else overwrites or messes with that data while it's in RAM
cache or on disk.
Index corruption means you've hit a hardware fault, OS bug, or possibly
a PostgreSQL bug.
Only some kinds of corruption could be detected by application-level
checksums. If the OS or storage subsystem just failed to write a page,
Pg wouldn't be able to tell, for example. Checksums _would_ detect split
page writes, single-bit faults, corrupted disk sectors and the like and
could potentially be useful.
> I don't have an active issue. Just trying to understand in detail how
> Postgres behaves under index corruption.
Like most forms of fault behaviour, it is undefined in the "C standard"
sense of the meaning, though perhaps not quite as willing to just eat
data ;-)
--
Craig Ringer
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: ringerc@ringerc.id.au, s5aly@yahoo.com
Subject: Re: Question on Postgres Index internals
In-Reply-To: <4E571DA1.9000206@ringerc.id.au>
* 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