Dear Sawada-san,
> Good idea. But the application_name is actually truncated to 63
> characters (NAMEDATALEN - 1)? If so, we need to do substring(... for
> 63) instead.
Yeah, the parameter will be truncated as one less than NAMEDATALEN:
```
max_identifier_length (integer)
Reports the maximum identifier length. It is determined as one less than the value of NAMEDATALEN when building the
server.
The default value of NAMEDATALEN is 64; therefore the default max_identifier_length is 63 bytes,
which can be less than 63 characters when using multibyte encodings.
```
But in Fujii-san's patch length is picked up by the following SQL, so I think it works well.
```
SELECT max_identifier_length FROM pg_control_init()
```
Best Regards,
Hayato Kuroda
FUJITSU LIMITED