RE: Allow escape in application_name (was: [postgres_fdw] add local pid to fallback_application_name)
От | kuroda.hayato@fujitsu.com |
---|---|
Тема | RE: Allow escape in application_name (was: [postgres_fdw] add local pid to fallback_application_name) |
Дата | |
Msg-id | TYAPR01MB58666157D4FF274822A76B3BF5D29@TYAPR01MB5866.jpnprd01.prod.outlook.com обсуждение исходный текст |
Ответ на | Re: Allow escape in application_name (was: [postgres_fdw] add local pid to fallback_application_name) (Fujii Masao <masao.fujii@oss.nttdata.com>) |
Ответы |
Re: Allow escape in application_name
Re: Allow escape in application_name (was: [postgres_fdw] add local pid to fallback_application_name) |
Список | pgsql-hackers |
Dear Fujii-san, Thank you for updating! Your modification is very interesting and I learn something new. > Attached is the updated version of the patch. I removed the test > for case (1). And I arranged the regression tests so that they are based > on debug_discard_caches, to simplify them. Also I added and updated > some comments and docs. Could you review this version? I agree removing (1) because it is obvious case. ```diff +-- If appname is set both as GUC and as options of server object, +-- the GUC setting overrides appname of server object and is used. +SET postgres_fdw.application_name TO 'fdw_guc_appname'; +SELECT 1 FROM postgres_fdw_disconnect_all(); + ?column? +---------- + 1 +(1 row) + +SELECT 1 FROM ft1 LIMIT 1; + ?column? +---------- + 1 +(1 row) + +SELECT application_name FROM pg_stat_activity + WHERE application_name IN ('loopback2', 'fdw_guc_appname'); + application_name +------------------ + fdw_guc_appname +(1 row) ``` I think we should SELECT ft6 because foreign server 'loopback' doesn't have application_name server option. I have no comments anymore. Best Regards, Hayato Kuroda FUJITSU LIMITED
В списке pgsql-hackers по дате отправления: