[pgpool-general: 1656] Config file suggestion / request

web at mr-paradox.net web at mr-paradox.net
Tue Apr 23 02:06:50 JST 2013


Hello!

I have a request for a change to the way the config files are handled.

Right now, the way the config file works it is very difficult to 
dynamically add / remove nodes programmatically. (i.e., via Puppet/Chef, etc.)

Which I think would be a huge boost to pgpool's popularity and usefulness to 
be able to do this.
I currently use it to load balance nodes in Amazon and it works fine, if i could
programmatically add and remove nodes then it would be perfect.

The key problem is the way that each stanza is identified (the sequential values
at the end of the parameter name) backend_hostname0, backend_hostname1, etc.

That structure is very difficult to create via puppet.

There are plenty of ways to solve this, but I think the current standard
way would be the "conf.d/*" pattern. Where each node would have a file under
a conf.d/ directory and then the primary config file would import all files
in that directory. (similar to apache/nginx/etc)

So under etc/conf.d/ would be (one for each host)
hostname1.conf
hostname2.conf

and in there you'd just have one stanza of:
backend_hostname=''
backend_port=''
backend_weight=''
backend_data_directory=''
backend_flag=''

I took a crack at the config file myself and didn't get that far. (I'm not fantastic with 
C) =). 

Thanks


More information about the pgpool-general mailing list