[Pgpool-hackers] proposal for new feature

Tatsuo Ishii ishii at sraoss.co.jp
Fri Nov 18 23:52:07 UTC 2011


> On Fri, 2011-11-18 at 21:15 +0900, mitani at sraw.co.jp wrote:
>> Hi Ishii-San,
>> 
>> Thank you for quick response.
>> 
>> In order to implement of redundancy for pgpoll, 
>> I think three functions are required as follows,
>> Observation, Take over and Recovery.
>> 
>> How to share the information, 
>>  that's a key point of this solution.
>> There are two methods to share the information.
>>  (1) servers use a data at same data location,
>>  (2) servers use same contents of data in own storage.
>> In either case have some pros and cons.
>> 
>> I'm planing to use the (1) method cause it can make simple.
>> And I'm going to use database as a shared data repository for pgpools.
>> In that case, the communication protocol also might be based on the libpq.
>> 
>> Anyway, this is still just an idea.
>> I'd like to have any comments for it.
>> 
> 
> Indeed, it's really interesting. I'm only wondering what kind of
> informations you'll need to keep. I would rather keep the multimaster
> capacity of pgpool like you said in your previous mail. So I guess the
> informations needed are the nodes' status, and the current action on a
> node. Is there anything more?

I think what Mitani-san meant was that "heartbeat" info. Pgpool needs
check if other pgpool node is alive. His idea is to prevent "split
brain" problem, pgool uses PostgreSQL database.

In the mean time, each pgpool node needs to share consistent opinion
whether PostgreSQL node X is alive. In multimaster configuration, each
pgpool node(suppose A and B) has network connection to PostgreSQL
(suppose X and Y). It is possible that connection A to X is ok, but B
to X is not. In this case pgpool B thinks X is down and degenerate it
while A thinks X is healthy. Of course this will lead to inconsistent
state of PostgreSQL clusters. To prevent the problem each pgpool needs
share the healthiness info on PostgreSQL clusters.

In summary we need to maintain healthiness info on both pgpool and
PostgreSQL.
--
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