[Pgpool-hackers] application_name
Guillaume Lelarge
guillaume at lelarge.info
Mon Feb 21 22:11:38 UTC 2011
Le 21/02/2011 09:43, Tatsuo Ishii a écrit :
> Hi pgpool hackers,
>
> We have discussed about a problem with "application_name" in
> Paris. Pgpool keeps connection to PostgreSQL. From PostgreSQL 9.0,
> there is a new SET variable called "application_name" which is left
> after clients disconnects to pgpool. So if you take a look at the
> output of pg_stat_activity, there are some entries which keep
> application_name as "psql" if you use psql via pgpool.
>
> I think we could just get ride of the problem by just adding 'SET
> application_name TO "pgpool"' to the reset_query_list in
> pgpool.conf(note that you should remove single quote).
>
> The reason why we use double quote surrounding pgpool is,
> reset_query_list does not allow to use single quote.
> (maybe we should introduce some escape syntax).
>
> Unfortunately pgpoolAdmin dislikes this when using pgpool.conf
> management page but it's different story.
>
> What do you think?
It's only one part of the story.
When a client disconnects from pgPool, pgPool should send the SET
command. Just like you said.
But, when a client reconnects to pgPool, pgPool should extract the
application_name parameter from the startup packet and send the
application_name to PostgreSQL, so that the application_name is the good
one.
--
Guillaume
http://www.postgresql.fr
http://dalibo.com
More information about the Pgpool-hackers
mailing list