Re: replication of data from postgresql DB on File System Level

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Saumitra Bhanage <saumitra(dot)bhanage(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: replication of data from postgresql DB on File System Level
Date: 2007-03-26 17:09:32
Message-ID: 20070326170932.GA28954@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Mar 06, 2007 at 11:12:12PM -0800, Saumitra Bhanage wrote:
> i have some queries about replication of data from one postgresql.. but by some different approch.
> as a small summry of my project,
> I am working on a project of replication of data. and I have done with kernel module programming in kernel 2.6 that has two machines A and B, when i update any file(in whole directory tree) on some specified directory on machine A, my programs updates the same file on machine B..
> (on each write system call on machine A, the difference in new file and old file is patched on machine B)
>
> So, now i can have my PostgreSQL database on some directory say /usr/share/data (on machine A)
> and have same on machine B initially.
>
> now what i want to do is replicate the changes made by machine A to B.

The question is why? Seems like an awfully complicated way to do it.

In any case, you can't ignore the changes in the clog/xlog, they are the
whole database. In fact, to do replication you *only* need the WAL, the
rest you can lose pretty much. If you try to replicate without then,
you'll only find that data corrupted later on...

As you noticed, the system only forces the WAL to get written out,
that's what guarentees crash safety, the actual data only gets written
out as necessary.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jesse Cleary 2007-03-26 19:29:36 Could not create relation: File exists error
Previous Message Kev 2007-03-26 16:20:48 Re: Server memory and efficientcy