DATA corruption after promoting slave to master

From: Karthik Iyer <karthik(dot)i(at)directi(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: DATA corruption after promoting slave to master
Date: 2014-06-25 11:29:17
Message-ID: 53AAB28D.1090807@directi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hello,

We are facing issues of some DB inconsistencies, while promoting the
slave to master.

[1] We have master-slave with Hot Standby Setup (log shipping).
[2] We also have a daemon process which copies the latest partial WAL
log file (which postgres is currently writing to, under pg_xlog/) every
3 secs to a different location.

Master server crashed. We decided to promote the slave to master.
Before, creating the trigger file we passed the partial WAL log file [2]
and made the slave replay the partial file as well(So that the data loss
is minimal). Following link has the errors that we saw at different stage:

http://pastebin.com/raw.php?i=Ekr0VrQA

We are seeing these problems in the newly promoted master now:

1. when we run queries on primary key, we don't get the rows even
if it exist in db. However if we force query not to use index, we get
those entries.
2. there are duplicate values for primary keys

Postgres version that we use:

9.0.13

Postgres conf : http://pastebin.com/raw.php?i=B0diaitG

Any help here is appreciated.

Thanks in advance.

- Karthik Iyer

Responses

Browse pgsql-general by date

  From Date Subject
Next Message James Le Cuirot 2014-06-25 13:43:25 Alternative to psql -c ?
Previous Message Michael Paquier 2014-06-25 01:34:33 Re: Can't start postgresql server