System/PostgreSQL/Londiste
Jump to navigation
Jump to search
Londiste 3
Provider
provider.ini:
[londiste3] job_name = job_master db = dbname=repl port=5432 host=host1.lunasys.fr pgq_queue_name = londiste.replica logfile = /var/log/londiste/%(job_name)s.log pidfile = /var/run/londiste/%(job_name)s.pid
pgq.ini:
[pgqd] job_name = mypgq db = dbname=repl port=5432 host=localhost maint_delay_min = 5 loop_delay = 0.1 logfile = /var/log/londiste/pgqd.log pidfile = /var/run/londiste/pgqd.pid use_skylog = 0
Initialize the provider (root node):
londiste3 provider.ini create-root node1 "dbname=repl host=host1.lunasys.fr port=5432"
Start the provider worker:
londiste3 -d provider.ini worker
Launch the PgQ daemon:
pgqd -d pgq.ini
Subscriber
subscriber.ini:
[londiste3] job_name = job_slave db = dbname=repl port=5432 host=host2.lunasys.fr pgq_queue_name = londiste.replica logfile = /var/log/londiste/%(job_name)s.log pidfile = /var/run/londiste/%(job_name)s.pid
Initialize the subscriber (leaf or branch node):
londiste3 subscriber.ini create-leaf node2 "dbname=repl host=host2.lunasys.fr port=5432" --provider="host=host1.lunasys.fr dbname=repl"
Start the subscriber worker:
londiste3 -d subscriber.ini worker