[pgpool-hackers: 2303] Re: RFC: New health check implementation

Tatsuo Ishii ishii at sraoss.co.jp
Fri Apr 28 15:43:51 JST 2017


Usama,

>> > I think you need to delete  *src/config/pool_config.c* and
>> > *src/tools/pgmd5/pool_config.c* autogenerated files before building the
>> > Pgpool-II, The reason being the memory for POOL_CONFIG->health_check_
>> params
>> > is allocated in pgpool_config.l and apparently the make is not
>> regenerating
>> > the pgpool_config.c.
>>
>> Oh, I totaly forget about it. Will try again...

A quick test shows that your patches work pretty well.

>> > I was also wondering that we could use the array for health_check_params
>> in
>> > POOL_CONFIG rather than a pointer and allocating it dynamically.
>>
>> But it requires health_check_params * MAX_NUM_BACKENDS (=128 for now)
>> memory. Sounds like waste of meory...
>>
> 
> Yes true, But we are already allocating the same amount of memory
> dynamically.

Oh, you are right. I thought we allocate
health_check_params*NUM_BACKENS memory but we actually allocate
health_check_params * MAX_NUM_BACKENDS, since we cannot determine the
value of NUM_BACKENDS until we finish parse the conf file.

BTW,

>> > I think you need to delete  *src/config/pool_config.c* and
>> > *src/tools/pgmd5/pool_config.c* autogenerated files before building the
>> > Pgpool-II, The reason being the memory for POOL_CONFIG->health_check_
>> params
>> > is allocated in pgpool_config.l and apparently the make is not
>> regenerating
>> > the pgpool_config.c.

Generating pgpool_config.c is intentionally disabled. But since we are
in a development phase so we can enable it until code freeze of
3.7. What do you think?

Just changing AM_MAINTAINER_MODE(disable) to
AM_MAINTAINER_MODE(enable) in configure.ac will make it.

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