Re: PostgreSQL and Windows 2003 DFS Replication - Mailing list pgsql-general

From Magnus Hagander
Subject Re: PostgreSQL and Windows 2003 DFS Replication
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCEA35544@algol.sollentuna.se
Whole thread Raw
In response to PostgreSQL and Windows 2003 DFS Replication  (Arnaud Lesauvage <thewild@freesurf.fr>)
List pgsql-general
> Hi list !
>
> I am currently deploying two servers (Windows 2003 R2) that will be
> used as file servers as well as PostgreSQL servers.
>
> One of the server will be the main server, the other one a backup
> server (no load-balancing, only an easy-recoverage solution).
> The goal is to be able to start working quickly after one of the
> server fails (after the main server fails actually, since the
> backup server is not used).
>
> I already configured a high-availability solution for the file
> server part by using the built-in DFS Replication service.
>
> I first thought I would use Slony-I to replicate changes to the
> main database on the backup server, but I then realized that I
> might use DFS Replication for that.
> The point is that I am not sure that it will work.
>
> Documentation about DFS Replication is not very talkative (IMHO), I
> have to little knowledge of PostgreSQL's file handling to know if
> it will work or not.
>
> I have compiled some informations about DFS Replication from
> Microsoft"s web site. Could you PostgreSQL gurus tell me whether
> using this replication mechanism is a good idea or not ?
> The main advantage for me is that I will not need to configure 2
> replication systems (one for the files, on for the DBs). I would
> only need to maintain one of them !

To add to this thread, even if it's a bit late:

It is *not* safe to use DFS/FRS replication for your PostgreSQL data
directory. DFS is not synchronous (which means you could lose committed
data or parts thereof), and it does *not* guarantee write order (which
means your database will quite likely end up completely corrupt if you
get a failover whenever anything is happening).


> * DFS Replication detects changes on the volume by monitoring the
> update sequence number (USN) journal, and DFS Replication
> replicates changes only after the file is closed.

This is also a problem - PostgreSQL generally doesn't close its files
until it's really necessary.


//Magnus


pgsql-general by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: What's special about 1916-10-01 02:25:20? Odd jump in internal timestamptz representation
Next
From: Roman Neuhauser
Date:
Subject: Re: select * from users where user_id NOT in (select