[pgpool-hackers: 1665] Re: New "PGPOOl SET" command and ERROR

Muhammad Usama m.usama at gmail.com
Sun Jun 26 21:13:37 JST 2016


On Sat, Jun 25, 2016 at 5:05 PM, Tatsuo Ishii <ishii at postgresql.org> wrote:

> Usama,
>
> The new "PGPOOl SET" command is great but I think the behavior is
> questionable when an error occurs.
>
> I mean If an error in PostgreSQL occurs in an explicit transaction,
> the whole transaction aborts and will not recover until ABORT or
> COMMIT command is issued. But if an error is caused by "PGPOOL SET"
> command, the transaction is not aborted because PostgreSQL does not
> know about the error.
>
> test=# BEGIN;
> BEGIN
> test=# PGPOOL SET backend_weight2 TO 0;
> ERROR:  invalid Context, value for parameter "backend_weight2" cannot be
> changed
> test=# SELECT 1;
>  ?column?
> ----------
>         1
> (1 row)
>
> There are many applications which know about the PostgreSQL's
> transaction behavior and issues ABORT or COMMIT in that case. I am
> afraid that the "PGPOOL SET" command's behavior may confuse such that
> applications.
>
> What about changing ERROR to WARNING in the PGPOOL SET command error
> case?
>
>
Yes, I totally agree, you got a valid concern and we should change the
ERROR type reported by PGPOOL SET

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's behaviour on WARNING
messages.
But still it is far better to use the WARNING instead of ERROR.

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's SET command we can use something like "PGPOOL ERROR"
to indicate it's only pgpool-II error and has nothing to do with the PG's
transaction?

e.g.
usama=# pgpool set backend to default ;
PGPOOL ERROR:  unrecognized configuration parameter "backend"
usama=#




> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
> _______________________________________________
> pgpool-hackers mailing list
> pgpool-hackers at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-hackers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20160626/834099e9/attachment.html>


More information about the pgpool-hackers mailing list