Re: Application name patch - v3

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Dave Page <dpage(at)pgadmin(dot)org>
Subject: Re: Application name patch - v3
Date: 2009-11-12 23:32:00
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi Dave,

On Thursday 22 October 2009 15:07:13 Dave Page wrote:
> Updated patch attached. Per discussion, this:
> - Changes the envvar name to PGAPPNAME
> - Removes support for setting application_name in the startup packet,
> and instead sends an explicit SET command as part of the connection
> setup in PQconnectPoll. In order to avoid adding to the
> application-visible connection states, this is overloaded on the
> CONNECTION_SETENV state which is only used in the v2 protocol at
> present and seems like an ideal fit for such a similar use.
I had some free time so I started to take a look at that patch:

+ PostgresPollingStatusType
+ pqAppnamePoll(PGconn *conn)
+ else
+ {
+ /* Query finished, so we're done */
+ conn->setenv_state = APPNAME_STATE_IDLE;
+ }
+ break;
+ }
Shouldnt that set appname_state?

The attached patch fixes this and also a couple occurances of trailing

What about pg_dump/psql setting fallback_application_name?


Attachment Content-Type Size
0001-Dave-Page-Application-name-patch-v3.patch text/x-patch 38.9 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Sabino Mullane 2009-11-12 23:37:38 Re: Listen / Notify rewrite
Previous Message Joshua D. Drake 2009-11-12 23:23:40 Re: EOL for 7.4?