[Pgpool-general] Load balancing read-write functions
Yoshiyuki Asaba
y-asaba at sraoss.co.jp
Fri May 30 06:47:25 UTC 2008
Hi,
From: Nelson Correia <nelsonwc7 at hotmail.com>
Subject: [Pgpool-general] Load balancing read-write functions
Date: Thu, 29 May 2008 10:00:54 +0000
> Hi,I have a scenario where I want to use Slony for master-slave
> replication and pgpool for load-balancing and where I have many
> functions with write commands. When using these functions I issue a
> command like "select * from somefunction(1, 'xpto')" and
> 'somefunction' will do several queries, being one of them an
> insert/update. How will pgpool load-balance this kind of queries? Is
> it able to see that it's not a read-only command and will send the
> command always only to the master? More generically, how did pgpool
> deal with functions and triggers?Thanks,Nelson
If you would like to send a SELECT query to a master node,
add "/* NO LOADBALANCE */" at the beginning of the query.
SELECT * from somefunction(1, 'xpto');
-->
/* NO LOADBALANCE */ SELECT * from somefunction(1, 'xpto');
Regard,
--
Yoshiyuki Asaba
y-asaba at sraoss.co.jp
More information about the Pgpool-general
mailing list