Re: Application name patch - v4

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marko Kreen <markokr@gmail.com>
Cc: Dave Page <dpage@pgadmin.org>, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>, Andres Freund <andres@anarazel.de>, pgsql-hackers <pgsql-hackers@postgresql.org>, Robert Haas <robertmhaas@gmail.com>, Dimitri Fontaine <dfontaine@hi-media.com>
Date: 2009-12-01T18:25:22Z
Lists: pgsql-hackers
Marko Kreen <markokr@gmail.com> writes:
> If the pooler gets new connection with same username:database
> as some existing connection, but with different appname,
> what it is supposed to do?

Whatever it wants to.  People seem to be imagining that the appname
isn't under the control of the pooler.  It's a connection property,
remember?  It won't be set at all unless the pooler explicitly sets it
or allows it to be set.

I would imagine that typically a pooler would consider the whole
connection string as defining connection properties and so appname would
work the same as username or anything else, ie, you get shunted into
a different connection pool if you ask for a different appname.

			regards, tom lane