Re: pgsql: postgres_fdw: Allow postgres_fdw.application_name to include esc

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: pgsql: postgres_fdw: Allow postgres_fdw.application_name to include esc
Дата
Msg-id dc411fde-fa8a-a732-81b2-38cfe79136f3@oss.nttdata.com
обсуждение исходный текст
Ответ на Re: pgsql: postgres_fdw: Allow postgres_fdw.application_name to include esc  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Ответы Re: pgsql: postgres_fdw: Allow postgres_fdw.application_name to include esc
Список pgsql-committers

On 2021/12/24 18:00, Kyotaro Horiguchi wrote:
> I saw the test has been revertd.

Yes, I reverted the added unstable tests not to prevent
buildfarm from testing other patches while I'm doing
the investigation.

> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake&dt=2021-12-24%2008%3A02%3A25
> 
>> NOTICE:  identifier
>> "pg_regress/postgres_fdwbuildfarmcontrib_regression_postgres_fdw757365%"
>> will be truncated to
>> "pg_regress/postgres_fdwbuildfarmcontrib_regression_postgres_fdw"
> 
> It's 70 characters long..
> 
> application_name: pg_regress/postgres_fdw
> user_name       : buildfarm
> database_name   : contrib_regression_postgres_fdw
> Source PID      : 757365
> 
> Maybe we can distribute the placeholders into several sessions.

Or probably we don't need to test all escape sequences. How about picking up one or two from them? But even if only one
ortwo are picked up, application_name still can be larger than 63 characters. So probably we also should use
substring()in the test query, for that case. For example,
 

SELECT count(*) > 0 FROM pg_stat_activity
   WHERE application_name = substring(current_setting('application_name') ||
     CURRENT_USER || current_database() || pg_backend_pid() || '%', 1, 63);

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION



В списке pgsql-committers по дате отправления:

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: pgsql: postgres_fdw: Allow postgres_fdw.application_name to include esc
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: pgsql: postgres_fdw: Allow postgres_fdw.application_name to include esc