Re: Corrupted index on 9.0.3 streaming hot standby - Mailing list pgsql-bugs

From Robert Haas
Subject Re: Corrupted index on 9.0.3 streaming hot standby
Date
Msg-id AANLkTi=TCA9iOJJAxi29Uz6GZ+3=o99_E-F2pJ8Q3ZG+@mail.gmail.com
Whole thread Raw
In response to Corrupted index on 9.0.3 streaming hot standby  (Jakub Ouhrabka <kuba@comgate.cz>)
Responses Re: Corrupted index on 9.0.3 streaming hot standby  (Jakub Ouhrabka <jakub.ouhrabka@comgate.cz>)
List pgsql-bugs
2011/2/25 Jakub Ouhrabka <kuba@comgate.cz>:
> Hi,
>
> we've found that we have corrupted index on 9.0.3 streaming hot standby.
> Master works ok. There is one more non-streaming standby which is ok as
> well. Platform is 64bit Linux.
>
> Database cluster and this database were created on 9.0.2 and than upgraded
> to 9.0.3. We are not aware of any crash on either master or streaming
> standby but we didn't investigate it deeply yet.
>
> For details about corrupted index see below. The table and index in question
> are mostly read-only (several queries per second) writes happen only few
> times a day.
>
> We've backed up whole cluster and recreated it.
>
> Shall we investigate it further? How? Is it possible that we make some
> mistake when doing initial backup which caused corruption? Is there a way to
> check other indexes?

The obvious way this could happen is if there were a system crash on
the standby.  In theory that should be OK too, but if fsync isn't
working properly due to a settings or disk controller configuration
problem or similar, then it might not be.

See also http://wiki.postgresql.org/wiki/Reliable_Writes

If there hasn't been a system crash on the standby, then it's harder
to explain.  It'd be interesting to compare the disk blocks in the
index on the standby with the disk blocks in the index on the master
and figure out which ones are different and in what way.  pg_filedump
might be useful.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: BUG #5895: Ability to match more than just CN in client certificate
Next
From: Robert Haas
Date:
Subject: Re: BUG #5907: ODBC % bug