1

With PostgreSQL, I want to replicate a subset of all tables from Database A to B, but only once a day. Since I do not know what to search for: is there a technical term for such a scenario? Does e.g. Slony-I support this?

2
  • Did You mean the replication only will sync one time per day ? Then You will have accumulated transaction to sync. Why would You want such scenario Feb 5, 2015 at 12:28
  • @SoniHarriz Yes. Roughly speaking, database A (read/write) is a preview for database B (read). At one time per day the current state needs to be synced to database B.
    – Matthias
    Feb 5, 2015 at 12:59

1 Answer 1

1

You can achieve this by stopping the replication, which is the slon daemon. By stopping the daemon, sync event get accumulated on sl_log tables on master. When slon get started again, this accumulated logs will get synced to slave.

Hope it helps.

2
  • How do I know when to stop the daemon? Won't sl_log get new entries during the process so that it potentially never gets empty? In this case, I would never know when to stop the replication.
    – Matthias
    Feb 5, 2015 at 15:56
  • daemon and sl_log are mutually exclusive, sl_log get accumulated from trigger processed by postgres itself, while daemon sync the log to slave. You can stop the daemon anytime, the logs still get accumulated. Feb 6, 2015 at 3:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.