[pgpool-general: 3589] Re: Master-Slave and white_function_list

Mephysto mephystoonhell at gmail.com
Wed Apr 1 16:36:21 JST 2015


Thank you Alex, thank you Сергей, I will do some tests today.

I have another question for you: can I call stored functions by SELECT *
<function name> or is the only way to have balancing calling stored
function by SELECT <function name>?

Bye.

Meph

On 1 April 2015 at 08:48, Сергей Мелехин <cpro29a at gmail.com> wrote:

> Hi!
> We are using this feature. Pgpool does not support schema specification in
> white/black lists so beware!
> The easiest way is to write comma separated list of your readonly
> functions. Only names, without schemas!
> Here's my settings:
>
> white_function_list           = 'parse_vac_query,get.*,rated_search'
> black_function_list           = ''
>
> all functions starting with "get" and parse_vac_query and rated_search are
> been balanced between master and slave. All other stored procedures execute
> on master only.
>
> С Уважением, Сергей Мелехин.
>
> 2015-04-01 6:10 GMT+10:00 Alex Toth <atoth at gravity.com>:
>
>>  If I understand  your question correctly you want to balance functions
>> in the schema stored_functions_v0.  I believe the only way is to list all
>> of the functions, but you can use regex pattern matching to make life
>> easier.  For example, if all those functions have "_v0" at the end of the
>> name you could do something like this:
>>
>> white_function_list = '.*_v0'
>> black_function_list = '.*'
>>
>> To see the load balancing happen you'll have to turn on query logging on
>> the backends and watch the postgres logs.  Remember, the load balancing is
>> by connection rather than by query so you'll have to disconnect and
>> reconnect each time to see the queries distribute across both backends.
>>
>>
>>   alex
>>
>>
>>
>> On 3/31/15 7:27, Mephysto wrote:
>>
>>  Hi there,
>> I'm using Postgres 9.4 and pgpool-II 3.4 in Master-Slave configuration
>> and streaming replication between nodes (two at the moment).
>>
>>  In my database I'm using a schema only for stored_functions, its name
>> il stored_functions_v0. I need some example to coonfigure
>> white_function_list parameter in pgpool.conf in order to balance readonly
>> stored functions beetween my nodes.
>>
>>  Can someone provide me these examples?
>>
>>  In case of load balancing of stored functions is feasible, how can I
>> check if load balancing work done?
>>
>>  Thanks in advance.
>>
>>  Kind regards.
>>
>>  Meph
>>
>>
>> _______________________________________________
>> pgpool-general mailing listpgpool-general at pgpool.nethttp://www.pgpool.net/mailman/listinfo/pgpool-general
>>
>>
>>
>> _______________________________________________
>> pgpool-general mailing list
>> pgpool-general at pgpool.net
>> http://www.pgpool.net/mailman/listinfo/pgpool-general
>>
>>
>
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20150401/0865c9a1/attachment.html>


More information about the pgpool-general mailing list