[Pgpool-hackers] Using application_name feature in 9.0

Tatsuo Ishii ishii at sraoss.co.jp
Fri Aug 6 03:54:25 UTC 2010


> I had a look in the source code to implement this new connection
> parameter, but I'm a bit lost.
> 
> I would really like to see pgpool-II using the fallback_application_name
> startup parameter for a connection. It will help people to know which
> connections are related to pgpool-II.
> 
> I can also work on that but I think I will need a few pointers.

I don't know about fallback_application_name. I assume you are talking
about application name.

Applicatoion name is passed from backend as a kind of
"ParameterStatus". See protocol-flow.html for more details.
In pgpool world, data of ParaemterStatus is kept by pool_params.c
module. There is an API:

char *pool_find_name(ParamStatus *params, char *name, int *pos)

So you can call it to get value assigned to application_name something
like:

pool_find_name(&MASTER(backend)->params, "application_name", &pos)
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the Pgpool-hackers mailing list