[pgpool-general: 3874] issue with master-slave streaming replication
piotr.synak at infobright.com
Thu Jul 16 22:30:47 JST 2015
I have a simple pgpool configuration with two nodes, each hosting pgpool and backend. It is master-slave configuration with watchdog and postgres streaming replication. No load balancing.
I am doing simple test in a script:
drop database test;
create database test;
When running above script directly on PG backend it works fine.
When running it against pgpool via delegate ip I get an error when connecting to database "test":
psql:./test.sql:3: \connect: ERROR: unable to read message kind
DETAIL: kind does not match between master(53) slot (45)
I noticed that when I introduce some delay between "Create database" and "Connect" then it works fine. So it looks like pgpool is waiting for replication to finish or some kind of confirmation from standby node (or anything else?). This is for me contradictory with the idea of asynchronous replication (and such is streaming replication) where we don't wait for any confirmation but execute immediately. Fact that it runs well when executed directly by backend proves that the issue is not in the streaming replication but in pgpool. How to overcome this problem? Is it known issue? Adding "sleep" after each dml is not a solution for me.
More information about the pgpool-general