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

David Fetter david at fetter.org
Sun Oct 27 04:04:32 JST 2013

On Wed, Sep 11, 2013 at 08:33:51AM -0400, Bruce Momjian wrote:
> 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.

Sorry to jump on this thread late.

There are two hard problems in computer science: naming things,
caching, and off-by-one.  Are you proposing that we deal with the
second by treating changing a function from possibly writing to only
reading as pilot error?  As a first approximation, that's probably
pretty good.

David Fetter <david at fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter at gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

More information about the pgpool-hackers mailing list