Re: Inconsistent DB data in Streaming Replication

From: Ants Aasma <ants(at)cybertec(dot)at>
To: Samrat Revagade <revagade(dot)samrat(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, andres(at)2ndquadrant(dot)com, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Inconsistent DB data in Streaming Replication
Date: 2013-04-09 07:26:40
Message-ID: CA+CSw_vVE7MoSMvOAR2vjCuteWxs58ukLfq4pXgGniRhCaVszg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 9, 2013 at 9:42 AM, Samrat Revagade
<revagade(dot)samrat(at)gmail(dot)com> wrote:
>>What Samrat is proposing here is that WAL is not flushed to the OS before
>>it is acked by a synchronous replica so recovery won't go past the
>>timeline change made in failover, making it necessary to take a new
>>base backup to resync with the new master.
>
> Actually we are proposing that the data page on the master is not committed
> till master receives ACK from the standby. The WAL files can be flushed to
> the disk on both the master and standby, before standby generates ACK to
> master. The end objective is the same of avoiding to take base backup of old
> master to resync with new master.

Sorry for misreading your e-mail. It seems like we are on the same
page here. I too have found this an annoying limitation in using
replication in an unreliable environment.

> Yes, taking backup is major problem when the database size is more than
> several TB. It would take very long time to ship backup data over the slow
> WAN network.

For WAN environment rsync can be a good enough answer, a tiny amount
of pages will be actually transferred. This is assuming a smallish
database and low bandwidth. For larger databases avoiding the need to
read in the whole database for differences is an obvious win.

Regards,
Ants Aasma
--
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt
Web: http://www.postgresql-support.de

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2013-04-09 07:36:55 Re: corrupt pages detected by enabling checksums
Previous Message Ants Aasma 2013-04-09 07:20:06 Re: Enabling Checksums