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

Tatsuo Ishii ishii at sraoss.co.jp
Mon May 23 13:59:40 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.

Not really. sleep 30 only happens when health_check_period <= 0.

> 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?

Yes, I think we'd better to have "delay_check_period" or some such.

> 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.

Oops. You are right. We should fix the code.

BTW, this part:
>>>   * only launch the worker process if health_check_period>0 (main.c)

If we want to do:

If delay_threshold/health_check_period set to greater than 0 and
pgpool.conf is reloaded, I would like to see delay checking starts.
Like wise, if delay_threshold/health_check_period is set to 0 and
pgpool.conf reloded, we need to stop worker process.

Probably it's lot easier to always start worker process right now,
just check those variables in the process.
--
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