Re: WIP patch for Todo Item : Provide fallback_application_name in contrib/pgbench, oid2name, and dblink - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: WIP patch for Todo Item : Provide fallback_application_name in contrib/pgbench, oid2name, and dblink
Date
Msg-id 001e01cd491a$11a7a830$34f6f890$@kapila@huawei.com
Whole thread Raw
In response to Re: WIP patch for Todo Item : Provide fallback_application_name in contrib/pgbench, oid2name, and dblink  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
> 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.

The doubt I have is that what name to use as fallback_application_name
because here we cannot have argv as in pgbench or oid2name?
The 2 options which I can think of are:
1. Hard-coded name - dblink
2. postgres - which I think will be caller of dblink functionality

Please suggest if any of this option is okay or what is other way to get the
program name.

-----Original Message-----
From: Robert Haas [mailto:robertmhaas@gmail.com] 
Sent: Wednesday, June 13, 2012 12:13 AM
To: Amit Kapila
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] WIP patch for Todo Item : Provide
fallback_application_name in contrib/pgbench, oid2name, and dblink

On Mon, Jun 11, 2012 at 5:30 AM, Amit Kapila <amit.kapila@huawei.com> wrote:
> As per the previous discussion in link below, it seems that fallback
> application name needs to be provided for only
>
> pgbench and oid2name.
>
>
http://archives.postgresql.org/message-id/w2g9837222c1004070216u3bc46b3ahbdd
fdffdbfb46212@mail.gmail.com
>
>
>
> However the title of Todo Item suggests it needs to be done for dblink as
> well.
>
> Please suggest if it needs to be done for dblink, if yes then what should
be
> fallback_application_name for it?

Why not 'dblink'?

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



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: XLog changes for 9.3
Next
From: Tom Lane
Date:
Subject: Re: Avoiding adjacent checkpoint records