[Pgpool-general] Database verification

Yoshiharu Mori y-mori at sraoss.co.jp
Sat Mar 6 12:39:43 UTC 2010


Hi.

> I recently started using pgpool to add some redundancy to one of our customer applications. So far so good, everything seems to be working fine, but I would like to have some extra verification that both database servers really are in sync. Is there a tool available that will let me compare a given table on both servers and tell me if there are differences? Thanks in advance!

I don't know such a useful tools, but the following procedures enable it. 

1. Lock a table of the master which wants to check consistency.
    ex)
    BEGIN;
    LOCK TABLE <table> IN SHARE ROW EXCLUSIVE MODE;

2.  Dump the table of the master and the slave.

    pg_dump or copy

3. Unlock a table.

    ABORT;

4.  Compare the dump data

-- 
SRA OSS, Inc. Japan
Yoshiharu Mori <y-mori at sraoss.co.jp>
http://www.sraoss.co.jp/



More information about the Pgpool-general mailing list