[Pgpool-general] How to replicate function with replicate_select disabled

Tatsuo Ishii ishii at sraoss.co.jp
Wed Jan 19 00:56:43 UTC 2011


> Sorry, now I understand fail over caused by the \d command problem is
> due to the replicate_select is set.  My question now is how to
> replicate a select function (with insert/update) when replicate_select
> is disabled.  It looks like that we can use 'black_function_list'
> mentioned in the manual.  However, is there an option to apply for all
> functions, instead of listing all of them under 'black_function_list',
> just in case there are too many to be listed ?  By the way, is there a
> limit for 'black_function_list' ?

You have two options:

1) Add all your functions to black_function_list you want to
   replicate. There's no limit for black_function_list.

2) Empty black_function_list and add a bogus function (for example
   "foo") to white_function_list. This will effectively replicate all
   function calls except "foo". Caution: this will cause an unwanted
   side effect: \d command will fail because replicated.

BTW pgpool-II 3.1 will have an ability to use regular expression in
black_function_list and white_function_list(Thanks to Gilles Darold
and Guillaume Lela!). So if your project decide to name the functions
starting with "my_function_" for example, you could put something like
"^my_function_.*$" to indicate that all functions starting with
"my_function_" should be treated as they are writing.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the Pgpool-general mailing list