[pgpool-hackers: 2645] Re: Load-balancing control for specific queries

Tatsuo Ishii ishii at sraoss.co.jp
Mon Dec 11 14:30:48 JST 2017


> On Thu, 30 Nov 2017 20:24:54 +0900 (JST)
> Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
> 
>> Ok. Anyway both of your proposals are clearly feature additions, so
>> even if we decided to implement them, we will not back patch them to
>> stable branches. That's the strict project's policy.
> 
> Ok. I agreed.
> 
>> >> > One of our clients wants a new feature that force specific 
>> >> > queries to be sent to the primary rather than load-balancing.
>> >> > 
>> >> > Even though we can do this by adding the /*NO LOAD BALANCE*/ comment
>> >> > to queries, this requires modifying application codes and
>> >> > this is not always possible.
>> >> > 
>> >> > We can think of at least two possible designs for this feature.
>> >> > 
>> >> > (1) Defining blacklist
>> >> > 
>> >> > Like black_function_list, specifying queries not to be load-balanced.
>> >> > 
>> >> > (2) Specifiying desitination nodes
>> >> > 
>> >> > Like database_redirect_preference_list, specify pairs of queries and node id
>> >> > (or primary/standby).
>> >> > 
>> >> > In both cases, the target queries can be specified by regexp pettern or tables
>> >> > included in the queries. (The client's preference is using regexp.)
> 
> By the way, which of above design do you like better? I think 2) Specifiying desitination
> nodes with using regexp is good because it is the most general among the above, and
> this design covers all cases that other designs can cover.

#2 is better I think.

BTW, it would be hard to allow node id be specified in the parameter
however (primary or standby is ok). Because after connection between
client and Pgpool-II is established, the load balance node is already
defined, which is either primary or one of standbys. If it is allowed
to specify other than primar or such standby, it will require major
rewriting of the load balance code because it currently only handles
the primary node and one standby node (the load balance node).

> Could you please share your thought fo it if you have?
> 
>> 
>> Best regards,
>> --
>> Tatsuo Ishii
>> SRA OSS, Inc. Japan
>> English: http://www.sraoss.co.jp/index_en.php
>> Japanese:http://www.sraoss.co.jp
> 
> 
> -- 
> Yugo Nagata <nagata at sraoss.co.jp>


More information about the pgpool-hackers mailing list