[pgpool-hackers: 360] Re: Auto-learning database-modifying functions

Tatsuo Ishii ishii at postgresql.org
Wed Sep 11 23:57:02 JST 2013


> As I understand it, PgPool in read-balancing mode needs to know which
> function calls modify the database so it knows to send these to the
> write server.
> 
> I know you can specify a pattern to identify database-modifying
> functions, but I am wondering if you could send queries containing
> questionable functions to the read-only server, and if you get a
> read-only error, then send them to the write server.  A more interesting
> approach would be to remember which functions cause these failures and
> then auto-route them to the write server when we see them again.

Interesting idea. Even we could overcome current limitation of
pgpool-II: cannot detect write functions used in a view by using the
technique.

> I believe this would give PgPool the ability to _learn_ which functions
> need to go to the write server.  Is this already implemented?

No.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list