[pgpool-general: 8972] 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 Nov 16 07:28:50 JST 2023


Thank you
Στις 15/11/23 06:02, ο/η Tatsuo Ishii έγραψε:
>> Thank you
>>
>> the point of my set_search_path function is to be dynamic, it depends
>> on current_user, I cannot declare this as immutable, and I don't want
>> this to be cached by pgpool (I have caching enabled).
> Ok, you want to avoid caching.
>
>> I am wondering :
>>
>> 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 ?

>
>> 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!
>
> Best reagards,
> --
> Tatsuo Ishii
> SRA OSS LLC
> English:http://www.sraoss.co.jp/index_en/
> Japanese:http://www.sraoss.co.jp
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general

-- 
Achilleas Mantzios
  IT DEV - HEAD
  IT DEPT
  Dynacom Tankers Mgmt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20231116/e43e3452/attachment.htm>


More information about the pgpool-general mailing list