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

Tatsuo Ishii ishii at sraoss.co.jp
Sun May 23 17:39:38 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?

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