[pgpool-general: 9251] 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 ?
Achilleas Mantzios
a.mantzios at cloud.gatewaynet.com
Thu Oct 31 04:34:32 JST 2024
Στις 17/11/23 19:47, ο/η Achilleas Mantzios έγραψε:
> Στις 17/11/23 02:46, ο/η Tatsuo Ishii έγραψε:
>>>>> a) How easy it could be to implement a new feature in pgpool to
>>>>> declare functions that will have to be routed in both primary and
>>>>> replica (POOL_BOTH in src/context/pool_query_context.c ).
>>>> The implementation will not be that hard. Question is, what is the UI
>>>> for the feature (how is like new parameter or parameter changes in
>>>> pgpool.conf).
>>> Would something like : primary_and_standby_routing_query_pattern_list
>>> or both_routing_query_pattern_list make sense ?
>> Yes, that's an idea. Another idea is, inventing something like
>> "both_routing_function_list", but this limits the key for routing to
>> only functions. On the other hand, it's easier for users to write an
>> entry because he/she just writes function name on it. The
>> query_pattern_list requires to write a regular expression.
> Thank you! I would be glad to help with either option if only I had
> the time. I really wish we (at Dynacom Tankers) could allocate some
> time for the junior programmers to do some serious C coding.
Dear pgpool people,
I was just curious if you took the time to look into this feature :
"both_routing_function_list" ? Or of you are considering adding it ?
>>
>>>>> b) if there was a mechanism in postgresql that a SET
>>>>> foo_guc_var="val"
>>>>> would result in calling a function.
>>>> I haven't tried myself, but I think you can do that by using
>>>> "customized options".
>>>> https://www.postgresql.org/docs/current/runtime-config-custom.html. It
>>>> allows to define "hook" that are called when the custom option is set
>>>> (and on other occasions).
>>> Thank you, writing an extension seems more involved, IMHO the straight
>>> forward solution you commented above sounds more correct!
>> Yeah, creating your own customized option needs more codes.
>>
>> 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