<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body vlink="#551A8B" text="#000000" link="#0B6CDA" bgcolor="#ffffff"
alink="#EE0000">
<div class="moz-cite-prefix">Thank you<br>
</div>
<div class="moz-cite-prefix">Στις 15/11/23 06:02, ο/η Tatsuo Ishii
έγραψε:<br>
</div>
<blockquote type="cite"
cite="mid:20231115.130208.77722586564740239.t-ishii@sranhm.sra.co.jp">
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">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).
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Ok, you want to avoid caching.
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">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 ).
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
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).</pre>
</blockquote>
<p>Would something like : <span style="font-family:monospace"><span
style="color:#000000;background-color:#ffffff;">primary_and_standby_routing_query_pattern_list
or </span></span><span style="font-family:monospace"><span
style="color:#000000;background-color:#ffffff;">both_routing_query_pattern_list
make sense ?</span></span><span style="font-family:monospace"><span
style="color:#000000;background-color:#ffffff;"></span></span></p>
<p><span style="font-family:monospace"></span><span
style="font-family:monospace"></span></p>
<blockquote type="cite"
cite="mid:20231115.130208.77722586564740239.t-ishii@sranhm.sra.co.jp">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">b) if there was a mechanism in postgresql that a SET foo_guc_var="val"
would result in calling a function.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
I haven't tried myself, but I think you can do that by using
"customized options".
<a class="moz-txt-link-freetext" href="https://www.postgresql.org/docs/current/runtime-config-custom.html">https://www.postgresql.org/docs/current/runtime-config-custom.html</a>. It
allows to define "hook" that are called when the custom option is set
(and on other occasions).</pre>
</blockquote>
Thank you, writing an extension seems more involved, IMHO the
straight forward solution you commented above sounds more correct!<br>
<blockquote type="cite"
cite="mid:20231115.130208.77722586564740239.t-ishii@sranhm.sra.co.jp">
<pre class="moz-quote-pre" wrap="">
Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: <a class="moz-txt-link-freetext" href="http://www.sraoss.co.jp/index_en/">http://www.sraoss.co.jp/index_en/</a>
Japanese:<a class="moz-txt-link-freetext" href="http://www.sraoss.co.jp">http://www.sraoss.co.jp</a>
_______________________________________________
pgpool-general mailing list
<a class="moz-txt-link-abbreviated" href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a>
<a class="moz-txt-link-freetext" href="http://www.pgpool.net/mailman/listinfo/pgpool-general">http://www.pgpool.net/mailman/listinfo/pgpool-general</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Achilleas Mantzios
IT DEV - HEAD
IT DEPT
Dynacom Tankers Mgmt</pre>
</body>
</html>