Hi ,
This is the pgpool Prefix option for skipping any statement to go to slave side. Let's consider an example. If we have "Pgpool" Replication and "No Load Balance" Mode.
In this case, we all know that all the SELECT operations goes to Primary Node Only. Ok, then what's case if we use "DECLARE CURSOR -> OPEN -> FETCH -> CLOSE" ? This is also a behvaiour of SELECT. But pgpool will replicate these kind of cases to Slave Node. To avoid this case, we need to use the above /*NO LOAD BALANCE*/ as a pgpool prefix.
Ex:-
postgres=#/*NO LOAD BALANCE*/ DECLARE --> OPEN --> FETCH-->CLOSE;
It won't cause to replicate (DECLARE/OPEN/FETCH/CLOSE) to slave.
What's the case if i use /*NO LOAD BALANCE*/ CREATE TABLE TEST(T INT)?; Well, Your guess is correct. Pgpool won't replicate this statement as well. Because, When Pgpool sees that prefix, it just ignore the following SQL statement to Slave. So, be careful about this parameter in pgpool.
Comments
Post a Comment