[Pgpool-general] can't attach two nodes simultaneously

Tomasz Chmielewski mangoo at wpkg.org
Tue Apr 13 19:51:46 UTC 2010


I noticed trying to attach two nodes with such commands:

pcp_attach_node -d 5 127.0.0.1 9898 user pass 0 ; pcp_attach_node -d 5 127.0.0.1 9898 user pass 1


will fail with:

pgpool: 2010-04-14 03:44:59 ERROR: pid 4270: failover_handler: invalid node_id -1 status:1 MAX_NUM_BACKENDS: 128


On the other hand, adding sleep in between makes it succeed:

pcp_attach_node -d 5 127.0.0.1 9898 user pass 0 ; sleep 1; pcp_attach_node -d 5 127.0.0.1 9898 user pass 1


But with "sleep", it's even less "atomic" then the first command.


My question:

1. Is it expected that it fails when we start pcp_attch_node one after another?

2. Is there a way to attach multiple nodes in an "atomic" way?


-- 
Tomasz Chmielewski
http://wpkg.org


More information about the Pgpool-general mailing list