Re: WAL corruption while replication

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Parkirat Bagga *EXTERN*" <parkiratbagga(at)gmail(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: WAL corruption while replication
Date: 2012-10-18 07:50:09
Message-ID: D960CB61B694CF459DCFB4B0128514C208902819@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Parkirat Bagga wrote:
> How to recover, if master postgres WAL got corrupted before it is
applied to
> the standby server?
>
> Will I loose all the data present in the WAL segment?
>
> How can I partially apply the WAL?

During normal recovery:
-----------------------

WAL will be replayed until the point of corruption,
then the server will stop recovering and come up.
The last WAL segment will be applied until the
point of corruption.

There is no way to recover past a corruption in
a WAL segment.

On a standby:
-------------

If you have streaming replication, you may not even
notice the problem if the standby is already connected
to the primary, because it does not read WAL archives in that case.

If you don't have streaming replication, the standby will
keep trying to apply the corrupted WAL segment and will
get stuck. There's no way to get the standby past the
point of corruption.
The same will happen in streaming replication if the primary
does not have the required information any more and the
standby has to use the WAL archives.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message teyking2003 2012-10-18 08:03:10 Database in psql
Previous Message Shams Khan 2012-10-18 06:13:52 Migration from Postgresql 9 to Oracle 10g