[Pgpool-general] White and blacklist of function

Guillaume Lelarge guillaume at lelarge.info
Mon Feb 7 09:58:12 UTC 2011


Le 07/02/2011 09:35, Wouter D'Haeseleer a écrit :
> Hi All,
> 
> Just an enhancement question.
> I have noticed that you need to keep a list of blacklisted functions in case one of the functions does a write to the db.
> 
> Maybe it's a good idea to tackle this in an automated way.
> Since if you do this kind of query on the standby server you will get a good error from postgres saying it is not possible to do update querys on the standby.
> If this error is tackled in pgpool and send to the primary then pgool could maintain a list of querys which will fail on the standby.
> 
> Therefore an autolearning feature would be welcome I think.
> 

This won't be easy to do. Let's say you have this query :

SELECT function_which_writes(), function_which_doesnt_write;

It fails with an error indicating that one tried to write, which
function is the culprit? pgpool-II can't guess that.

Moreover, it would deny the capacity to load balance explicit transactions.


-- 
Guillaume
 http://www.postgresql.fr
 http://dalibo.com


More information about the Pgpool-general mailing list