i'm working on project of file system replication and done with that.. i replicate files on machine A to machine B on network as soon as any file is modified on machine A..
so i want to apply this concept further to databases.
i've tried by many ways.. that worked in replicating databases..
one way i used recently is like this...
i have two machies A and B on network.. with postgres installed on machine A and B,
with postmaster on B off..
now i keep track on all files in data directory of postgresql database on machine A
i mirror all files on machine A db dir to machine B(Except xlog dirctory.. big file causess bandwidth problem)
when i might need database back (in case of physical damage on machine A) i call "pg_resetxlog" on machine B to avoid consistency issues generated by not consistent xlog files..
then i start Postmaster on machine B and get my database back...
anyproblem with this approch..??
earlier i mirrored xlog too.. that ofcourse, did work.. but wasted time in patching the big xlog files each time..
(btw i've to stick to file system replication approach, thats part of my project)