Re: WIP patch for Todo Item : Provide fallback_application_name in contrib/pgbench, oid2name, and dblink

From: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
To: "'Robert Haas'" <robertmhaas(at)gmail(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP patch for Todo Item : Provide fallback_application_name in contrib/pgbench, oid2name, and dblink
Date: 2012-06-14 14:10:14
Message-ID: 000c01cd4a37$6b894f70$429bee50$@kapila@huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> That seems undesirable. I don't think this is important enough to be
worth reparsing > the connection string for.
The connect string should not be long, so parsing is not a big cost
performance wise.
I have currently modified the code for dblink in the patch I have uploaded
in CF.
However as per your suggestion, I will remove it during handling of other
Review comments for patch unless somebody asks to keep it.

-----Original Message-----
From: Robert Haas [mailto:robertmhaas(at)gmail(dot)com]
Sent: Thursday, June 14, 2012 7:25 PM
To: Amit Kapila
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] WIP patch for Todo Item : Provide
fallback_application_name in contrib/pgbench, oid2name, and dblink

On Wed, Jun 13, 2012 at 12:07 AM, Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
wrote:
>
>> Why not 'dblink'?
>
> We can do for dblink as well. I just wanted to check before implementing
in
> dblink.
>
> I have checked the dblink_connect() function, it receives the connect
string
> and used in most cases that string to
> call libpq connect which is different from pgbench and oid2name where
> connection parameters are formed in main function and then call libpq
> connect.
>
> To achieve the same in dblink, we need to parse the passed connection
string
> and check if it contains fallback_application_name, if yes then its okay,
> otherwise we need to append fallback_application_name in connection
string.

That seems undesirable. I don't think this is important enough to be
worth reparsing the connection string for. I'd just forget about
doing it for dblink if there's no cheaper way.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2012-06-14 14:14:02 Re: libpq compression
Previous Message Robert Haas 2012-06-14 14:04:22 Re: [PATCH 02/16] Add zeroRecPtr as a shortcut for initializing a local variable to {0, 0}