Data replication through disk replication - Mailing list pgsql-general

From Thomas Lopatic
Subject Data replication through disk replication
Date
Msg-id 464DA083.3010207@lopatic.de
Whole thread Raw
Responses Re: Data replication through disk replication
Re: Data replication through disk replication
Re: Data replication through disk replication
List 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


pgsql-general by date:

Previous
From: Kenneth Downs
Date:
Subject: Re: Paypal and "going root"
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Data replication through disk replication