Re: How to recovery failed master after failover

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: dazhoufei(at)gmail(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to recovery failed master after failover
Date: 2014-03-04 06:27:26
Message-ID: 20140304.152726.1910383766760673591.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I am evaluating the HA solution of PostgreSQL 9.3.
> 1. Pacemaker resource agent for PostgreSQL + PostgreSQL sync stream
> replication
> 2. PG-Pool + PostgreSQL sync stream replication
> According to my understanding, above two solution must be done same
> things to recovery failed master as new slave after fail over: copy the
> database from new master. Is it necessary operation to recovery failed
> master? Does it protect the data consistent after fail over?
> If copy operation is necessary, recovery time very depend on database
> size. For example, our database size is 10G, we have to wait for a few
> minutes for copying new master data by network.

I'm not in position to speak about the Pacemaker resource agent. I
only speak about pgpool-II.

The reason why the failed master need to be recovered is,
availability, not consistency. If you do not do that, you only have
the new master at that point. If it goes down, it's the end of your
system.

About the 10G database recovery. you do *not* need to wait until all
the data copied. You can issue not only read queries but write queries
to the system. Any modifications to the database while copying data
has been recorded to WAL (or archive log) and will be sent to new
slave afterward. The only concern is the additional load to copy
data. You could overcome it by affording more higher spec hardwares.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adarsh Sharma 2014-03-04 06:57:50 Join Bad Performance on different data types
Previous Message snowbird 2014-03-04 06:11:48 How to recovery failed master after failover