Re: Allow escape in application_name - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Allow escape in application_name
Date
Msg-id e7b61420-a97b-8246-77c4-a0d48fba5a45@oss.nttdata.com
Whole thread Raw
In response to RE: Allow escape in application_name  ("kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>)
Responses RE: Allow escape in application_name  ("kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>)
Re: Allow escape in application_name  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers

On 2021/12/27 10:40, kuroda.hayato@fujitsu.com wrote:
> Dear Fujii-san, Horiguchi-san,
> 
> I confirmed that the feature was committed but reverted the test.
> Now I'm checking buildfarm.

Attached is the patch that adds the regression test for postgres_fdw.application_name. Could you review this?

As Horiguchi-san suggested at [1], I split the test into two, and then tweaked them as follows.

1. Set application_name option of a server option to 'fdw_%d%p'
2. Set postgres_fdw.application_name to 'fdw_%a%u%%'

'fdw_%d%p' and 'fdw_%a%u%%' still may be larger than NAMEDATALEN depending on the regression test environment. To make
thetest stable even in that case, the patch uses substring() is truncate application_name string in the test query's
conditionto less than NAMEDATALEN.
 

[1]
https://postgr.es/m/20211224.184406.814784272581964942.horikyota.ntt@gmail.com


> But anyway I want to say thank you for your contribution!

Thanks!

Regards,

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

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Skipping logical replication transactions on subscriber side
Next
From: "kuroda.hayato@fujitsu.com"
Date:
Subject: RE: Allow escape in application_name