Re: Client application name - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Client application name
Date
Msg-id 4ADF4B86.5020204@enterprisedb.com
Whole thread Raw
In response to Re: Client application name  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> That options hack was just an ugly hack, I don't like it at all ---
> mainly because I don't believe that approach scales to solve more
> than one case either.

It does if you hack it even more: don't pass the (first) options
directly as command line arguments, but parse it in ProcessStartupPacket
into a list of GUC settings. Add the ones that the server version
understands into the usual list of GUCs to set, and ignore others.

Yeah, ugly as hell, but does scale if used wisely.

One possible issue is that there might be 3rd party applications out
there that speak the fe/be protocol, like proxies. They might not like
an extra options line. I don't think it's a show-stopper, but would need
to check at least the popular ones out there.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Prelim specs for parser hooks for plpgsql
Next
From: Josh Berkus
Date:
Subject: Re: Controlling changes in plpgsql variable resolution