Data replication through disk replication

From: Thomas Lopatic <thomas(at)lopatic(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Data replication through disk replication
Date: 2007-05-18 12:48:03
Message-ID: 464DA083.3010207@lopatic.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi there,

I am currently looking into replicated two-node master/slave PostgreSQL
environments. Lately I've heard more and more people recommend
replicating data from the master to the slave at the disk device level
as opposed to the DBMS level (Slony-I). On Linux, usually DRBD is
recommended for this, which is basically RAID-1 via a network
connection, i.e. DRBD copies everything that the master writes to its
disk to the slave.

What I keep wondering: Isn't there substantial risk involved?
I mean, suppose the master fails in the middle of a write. Isn't there
the possibility that this corrupts the database? How robust is
PostgreSQL's on-disk file format and write caching strategy against
failures like this?

With something like Slony-I some data may not be fully copied to the
slave when the master crashes. So there may be data loss. But there
isn't the risk of database corruption.

Or am I missing something here?

Thanks,
-Thomas

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kenneth Downs 2007-05-18 12:48:38 Re: Paypal and "going root"
Previous Message Lew 2007-05-18 12:43:41 Re: hi