Answer the question
In order to leave comments, you need to log in
How to fix londiste ERROR Node 'slave_IP' already exists?
I used londiste for logical replication between PostgreSQL 9.3 and 9.5
After a while I started using londiste again.
But I didn't remove node after using londiste.
List package
yum list skytools*
Installed Packages
skytools-95.x86_64 3.2.6-1.rhel7
skytools-95-modules.x86_64 3.2.6-1.rhel7
cat /etc/skytools/londiste-master.ini
[londiste3]
job_name = appqueue
db = dbname=my_database host=master_IP
queue_name = appqueue
logfile = /var/log/skytools/master.log
pidfile = /var/run/skytools/master.pid
cat /etc/skytools/londiste-slave.ini
[londiste3]
job_name = appqueue
db = dbname=my_database
queue_name = appqueue
logfile = /var/log/skytools/slave.log
pidfile = /var/run/skytools/slave.pid
qadmin -h master_IP -U postgres -d my_database -c "install londiste"
INSTALL
pg_dump -h master_IP -s -C -U postgres my_database |psql -U postgres
su postgres -c "londiste3 /etc/skytools/londiste-master.ini create-root master_IP 'dbname=my_database host=master_IP'"
2017-10-27 08:36:16,250 20249 INFO plpgsql is installed
2017-10-27 08:36:16,250 20249 INFO pgq is installed
2017-10-27 08:36:16,252 20249 INFO pgq.get_batch_cursor is installed
2017-10-27 08:36:16,252 20249 INFO pgq_ext is installed
2017-10-27 08:36:16,253 20249 INFO pgq_node is installed
2017-10-27 08:36:16,254 20249 INFO londiste is installed
2017-10-27 08:36:16,254 20249 INFO londiste.global_add_table is installed
2017-10-27 08:36:16,262 20249 INFO Node is already initialized as root
su postgres -c "londiste3 /etc/skytools/londiste-slave.ini create-leaf slave_IP dbname=my_database --provider='host=master_IP dbname=my_database'"
2017-10-27 08:37:10,984 20414 WARNING No host= in public connect string, bad idea
2017-10-27 08:37:10,991 20414 INFO plpgsql is installed
2017-10-27 08:37:10,992 20414 INFO pgq is installed
2017-10-27 08:37:10,993 20414 INFO pgq.get_batch_cursor is installed
2017-10-27 08:37:10,993 20414 INFO pgq_ext is installed
2017-10-27 08:37:10,994 20414 INFO pgq_node is installed
2017-10-27 08:37:10,994 20414 INFO londiste is installed
2017-10-27 08:37:10,994 20414 INFO londiste.global_add_table is installed
2017-10-27 08:37:11,006 20414 INFO Initializing node
2017-10-27 08:37:11,022 20414 ERROR Node 'slave_IP' already exists
su postgres -c "londiste3 -d /etc/skytools/londiste-slave.ini worker"
Ignoring stale pidfile
su postgres -c "londiste3 -d /etc/skytools/londiste-master.ini worker"
Ignoring stale pidfile
pgqd -d /etc/skytools/pgqd.ini
2017-10-27 08:38:31.638 20659 LOG Starting pgqd 3.2.6
su postgres -c "londiste3 /etc/skytools/londiste-master.ini status"
Queue: appqueue Local node: master_IP
None (None)
Tables: 0/0/0
Lag: (n/a), NOT UPTODATE
master_IP (root)
Tables: 0/0/0
Lag: 17h56m7s, Tick: 1
su postgres -c "londiste3 /etc/skytools/londiste-slave.ini drop-node slave_IP"
2017-10-27 09:20:50,945 29464 ERROR get_node_database: cannot resolve slave_IP
su postgres -c "londiste3 /etc/skytools/londiste-slave.ini drop-node slave_IP dbname=my_database"
2017-10-27 09:21:17,859 29543 ERROR command 'drop-node' got 2 args, but expects 1: node_name
su postgres -c "londiste3 /etc/skytools/londiste-master.ini drop-node master_IP"
2017-10-27 09:24:32,038 30190 ERROR node still has subscribers
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question