[pgpool-hackers: 3908] Re: max hostname length in Pgpool-II

Tatsuo Ishii ishii at sraoss.co.jp
Thu May 27 19:41:39 JST 2021


>> Pgpool-II has two definitions of max hostname length:
>> 
>> src/include/pcp/libpcp_ext.h:
>> #define MAX_DB_HOST_NAMELEN	 128
>> 
>> src/include/pool_config.h:
>> #define WD_MAX_HOST_NAMELEN (128)
>> 
>> First question is, why we have the hostname length definition in two
>> places. Probably we should unify them into single definition.
>> 
>> Besides this, 128 seems to be inappropriate. According the wiki page:
>> 
>> https://en.wikipedia.org/wiki/Hostname
>> 
>> Max hostname length is 253, rather than 128. If we account the null
>> terminator, that will be 254.
>> 
>> Comments?
> 
> Attached is a patch to fix this. If there's no objection, I will
> commit/push.

Fix pushed.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list