<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 25, 2016 at 5:05 PM, Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Usama,<br>
<br>
The new &quot;PGPOOl SET&quot; command is great but I think the behavior is<br>
questionable when an error occurs.<br>
<br>
I mean If an error in PostgreSQL occurs in an explicit transaction,<br>
the whole transaction aborts and will not recover until ABORT or<br>
COMMIT command is issued. But if an error is caused by &quot;PGPOOL SET&quot;<br>
command, the transaction is not aborted because PostgreSQL does not<br>
know about the error.<br>
<br>
test=# BEGIN;<br>
BEGIN<br>
test=# PGPOOL SET backend_weight2 TO 0;<br>
ERROR:  invalid Context, value for parameter &quot;backend_weight2&quot; cannot be changed<br>
test=# SELECT 1;<br>
 ?column?<br>
----------<br>
        1<br>
(1 row)<br>
<br>
There are many applications which know about the PostgreSQL&#39;s<br>
transaction behavior and issues ABORT or COMMIT in that case. I am<br>
afraid that the &quot;PGPOOL SET&quot; command&#39;s behavior may confuse such that<br>
applications.<br>
<br>
What about changing ERROR to WARNING in the PGPOOL SET command error<br>
case?<br>
<br></blockquote><div><br></div><div>Yes, I totally agree, you got a valid concern and we should change the ERROR type reported by PGPOOL SET</div><div><br></div><div>But changing ERROR to WARNING can again have a potential to confuse some users. User may think its only a WARNING message and expects the SET command was successful, similar to the PostgreSQL&#39;s behaviour on WARNING messages.</div><div>But still it is far better to use the WARNING instead of ERROR. </div><div><br></div><div>There is another option, What do you think of using altogether a different message for PGPOOL SET command. Like for instance since we are using PGPOOL keyword for pgpool&#39;s SET command we can use something like &quot;PGPOOL ERROR&quot; to indicate it&#39;s only pgpool-II error and has nothing to do with the PG&#39;s transaction?</div><div><br></div><div>e.g.</div><div><div>usama=# pgpool set backend to default ;</div><div>PGPOOL ERROR:  unrecognized configuration parameter &quot;backend&quot;</div><div>usama=# </div></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
_______________________________________________<br>
pgpool-hackers mailing list<br>
<a href="mailto:pgpool-hackers@pgpool.net">pgpool-hackers@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br>
</blockquote></div><br></div></div>