replication of data from postgresql DB on File System Level

From: Saumitra Bhanage <saumitra(dot)bhanage(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: replication of data from postgresql DB on File System Level
Date: 2007-03-07 07:12:12
Message-ID: 378319.45212.qm@web38508.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

so i started my program in this situations by passing whole directory.
1> stopped postgres on B
2> updated on A
3> started postgres on B
4> checked database on B IT WAS UPDATED..

now just problem is, the updation is taking much time.. I WANT THAT TO EXECUTE FASTER.

so can i AVOID replication of SOME FILES?? like log files etc?
like 000010000000 file in pg_xlog its 16MB and taking too much time for patching.
Or should i replicate only files that are in ..../base/ directory?

the replication works something like this..
i update something on machine A
1> WAL updated.(.../pg_xlog/00000100000)

2> (after about 2 min) .../base/<database number> gets updated

3> (after about 5 min) WAL updated (.../pg_xlog/00000100000)

4> ../pg_clog/0000 updated

5> ../global/pg_control gets updated.
after all this i can see the database updated!
how can i see immediate results?

after executing checkpoint, WAL flushed and database updated.. but though, problem of transferring BIG xlog files still remains. :(

Thanks,
Saumitra.


---------------------------------
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message RPK 2007-03-07 07:47:01 Determine users and roles
Previous Message Peter Eisentraut 2007-03-07 06:52:55 Re: vacuum error