Re: Application name patch - v4

From: Marko Kreen <markokr(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
Subject: Re: Application name patch - v4
Date: 2009-12-01 20:07:06
Message-ID: e51f66da0912011207p33bfae91k2f18745eca957593@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/1/09, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Marko Kreen <markokr(at)gmail(dot)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.

No, at least both pgbouncer and pgpool consider only (username, database)
pair as pool identifier. Rest of the startup params are tuned on the fly.
And I think that should stay that way.

Instead, could we make it equal to rest of startup params and track
it's changes via ParamStatus?

That makes it possible for poolers to handle it transparently.
(IOW, you can put several poolers between client and server and
nothing breaks)

--
marko

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-12-01 20:18:31 Re: Application name patch - v4
Previous Message Greg Stark 2009-12-01 20:05:53 Re: Block-level CRC checks