[Pgpool-general] Load testing for a new pg server

Gavin Hamill gdh at laterooms.com
Sat Apr 8 14:28:16 UTC 2006


Hi,

I originally posted this on the pg general list, but now that I've
looked at pgpool more closely, it might be a trivial code change to do
what I'm after :)

We have two pg 8.1.3 servers, one live and one test. What I'd like to do
is use pgpool to act as a connection broker, but instead of using
pgpool's own replication where all queries are sent to both servers,
and SELECTs are split between both servers, I'm aiming for this
scenario:

UPDATE/DELETE/INSERT go only to live, - Slony is replicating live
to test. This permits test to go offline if necessary and easily 'catch
up' later. So, master_slave_mode in pgpool is dealing with this part of
the problem already - hurrah!

But here's the rub; I'd like all SELECTs to go to *both* live and test,
but only the answers from live are sent back to clients - the answers
from test are received by pgpool and immediately discarded.

At present, I can only split the queries between the two backend
servers, with the risk of the test machine malfunctioning.

Having all SELECTs go to both would very gracefully allow the test
machine to be monitored with the real workload but without any danger of
affecting the performance of the live system / returning bad data..

Has this been done already? Would it be simple to add? Would anyone have
a chance to hack it in to pgpool? :)) 

It seems like a really useful extra mode of operation to add to
pgpool's arsenal!

Cheers,
Gavin.



More information about the Pgpool-general mailing list