[pgpool-general: 8966] Re: Can we define a function func_set_search_path so that select func_set_search_path will execute to both primary and secondary nodes ?

Tatsuo Ishii ishii at sraoss.co.jp
Tue Nov 14 09:18:07 JST 2023


Hi,

> Hello pgpool world
> 
> pgpool thankfully sends all SET commands to both primary and secondary
> nodes. Hence, it handles correctly SET search_path TO ...;  But what
> if we have a more complex function or procedure to handle the setting
> search_path? How can we tell pgpool to execute this function/procedure
> to all load balancing nodes ?

Unfortunately there's no such a feature in Pgpool-II.

Maybe you could create wrapper functions calling the search_path
setting function, say f1 and f2, then call f1 and f2. f1 is declared
as a volatile function, thus will be sent to primary. On the other
hand f2 is declared as immutable and will be sent to the load balance
node (of course you can use write_function_list or read_function_list
instead).

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp


More information about the pgpool-general mailing list