Hi everyone. I did some more digging. It seems that there are two factors here.
1) Something internal to pgpool seems to care about the order properties are
declared or something. I had the idea to re-copy pgpool.conf.sample and re-do
all the changes I made manually, but without moving things around. Now I am
able to use reload to add a node into the pool.
2) You cannot re-assign a backend host name once it has been loaded, even if
that node is out of service (status 3). Is this by design? It is kind of
disturbing and definitely misleading that the debug output shows that the
hostname has been changed, although it does not change underneath as revealed
by pcp_node_info. This means in an environment like EC2 where you do not have
fixed IPs, you will have an ever-increasing list of backends as you decide to
move nodes in/out of service which turns into a maintenance issue and probably
a performance issue as well.
Thanks. Simple repro below to show that a hostname cannot be reassigned:
cp pgpool.conf.sample pgpool.conf
edit pgpool.conf to uncomment backend0 and enable replication:
replication_mode = true
backend_hostname0 = 'host1'
backend_port0 = 5432
backend_weight0 = 1
backend_data_directory0 = '/data'
Now start pgpool.
Edit pgpool.conf, un-comment backend1 configuration. Then run
pgpool reload
and
./pcp_node_info 10 localhost 9898 postgres localhost 1
output:
host2 5433 3 1073741823.500000
Ok, good. We got the new node. Now change pgpool.conf again:
backend_hostname1 = 'hosttwo'
And run:
pgpool reload
./pcp_node_info 10 localhost 9898 postgres localhost 1
output:
host2 5433 3 1073741823.500000
the hostname was not updated.
From: [email protected]
To: [email protected]; [email protected]
Date: Wed, 22 Apr 2009 00:39:58 -0700
Subject: Re: [Pgpool-general] Able to do online recovery for failed nodes but
not to attach new node
Sorry for the spam. But I also tried single-quotes around the hostname, eg,
backend_hostname1 = 'bar'
And got the same results. The reload is just not getting reflected when queried
by PCP.
Windows Live™ Hotmail®:…more than just e-mail. Check it out.
_________________________________________________________________
Windows Live™ Hotmail®:…more than just e-mail.
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_more_042009
_______________________________________________
Pgpool-general mailing list
[email protected]
http://pgfoundry.org/mailman/listinfo/pgpool-general