Re: fallback_application_name and pgbench
От | Magnus Hagander |
---|---|
Тема | Re: fallback_application_name and pgbench |
Дата | |
Msg-id | w2g9837222c1004070216u3bc46b3ahbddfdffdbfb46212@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: fallback_application_name and pgbench (Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp>) |
Ответы |
Re: fallback_application_name and pgbench
|
Список | pgsql-hackers |
On Wed, Apr 7, 2010 at 10:21, Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp> wrote: > > Fujii Masao <masao.fujii@gmail.com> wrote: > >> By default, the application_name of pgbench is "[unknown]". But I think >> that pgbench should use fallback_application_name as psql, pg_dump, >> etc does. Is it worth creating the patch? > > If we will take care of fallback_application_name for contrib modules, > we need to fix not only "pgbench" but also "oid2name" and "dblink". > I think those fixes would be worth; at least for telling third-party > developers to handle the new parameter. Uh, why fallback_application_name? Isn't this the *exact* usecase where "application_name" should be used? At least for the two apps - fallback_app_name might be correct for dblink. And yes, I think it's a good idea to set it for at least pgbench and oid2name. > It might be better to set fallback_application_name automatically > in libpq, but it requires argv[0] away from main() function. > GetModuleFilename() is available on Windows for the purpose, > but I don't know what API is available on other platforms. I think that's a pretty bad idea in general. But if we do, then it should at least never override something that's specified - we need to keep the ability for tools like psql and pgadmin to set it, regardless of what they happen to have as argv[0]. -- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/
В списке pgsql-hackers по дате отправления: