A couple of customers have recently asked for enhancements of pgbouncer, and I have provided them.
One that's been working for a while now, puts the address and port of the actual client (i.e. the program that connects to the proxy) into the session's application_name setting. That means that if you want to see where the client is that's running some query that's gone rogue, it's no longer hidden from you by the fact that all connections appear to be coming from the pgbouncer host.You can see it appearing in places like pg_stat_activity.
It only works when a client connects, so if the client itself sets application_name then the setting gets overridden. But few clients do this, and the original requester has found it useful. I've submitted this to the upsteam repo, as can be seen at https://github.com/markokr/pgbouncer-dev/pull/23.
The other enhancement is the ability to include files in the config file. This actually involves a modification to the library pgbouncer uses as a git submodule, libusual. With this enhancement, a line that has "%include filename" causes the contents of that file to be included in place of the directive. Includes can be nested up to 10 deep. The pull request for this is at https://github.com/markokr/libusual/pull/7. This one too sems to be working happily at the client's site.
There is one more enhancement on the horizon, which involves adding in host based authentication control similar to that used by Postgres. That's a rather larger bit of work, but I hope to get to it in the next month or two.
When will we see pgbouncer 1.6? I reall look forward to per database/per user pool_mode.
ReplyDeleteWhy would you ask here? I am not the pgbouncer maintainer and this is not the pgbouncer site. I'm simply someone who has hacked a few changes to it.
Delete