[Pgpool-hackers] worker process launch even when health_check_period=0

Guillaume Lelarge guillaume at lelarge.info
Mon May 23 13:46:01 UTC 2011


Le 05/23/2011 03:02 PM, Tatsuo Ishii a écrit :
>> AFAICT, the worker process has one work to do: check replication lag.
>> pgPool only needs to check replication lag if we are using streaming
>> replication and if health check is enabled. However, it seems it checks
>> replication lag even if health check is disabled (with
>> health_check_period=0).
>>
>> This looks like a bug to me.
>>
>> I see two fixes:
>>   * only launch the worker process if health_check_period>0 (main.c)
>>   * before checking lag, make sure that health_check_period>0
>>     (pool_worker_child.c)
>>
>> I can write the patch, it won't be difficult. Just want to make sure
>> you're OK with this and that I didn't miss something.
> 
> People might want to check replication delay even if they are not
> using health check, no?

Sure. They might want. If we say so, we shouldn't say otherwise in the
docs ("If delay_threshold is 0 or health checking is disabled, the delay
checking is not performed.") Moreover, I don't see why the worker should
sleep 30+health_check_period. And last one, it's kind of weird to
disable helath-check but still use health_user to check the replication lag.

Maybe we should use the worker for different kinds of checks:
replication lag, health, others?

Anyway, right now, we have one main issue. We say in the docs that
replication lag is disabled if health_check is disabled, but the code
doesn't do that. At least one of them should be fixed. And I think we
need to fix the code.


-- 
Guillaume
 http://www.postgresql.fr
 http://dalibo.com


More information about the Pgpool-hackers mailing list