[Pgpool-hackers] READ ONLY transactions: A Model for Pgpool

David Fetter david at fetter.org
Mon Oct 16 07:00:36 UTC 2006


On Mon, Oct 16, 2006 at 03:38:40PM +0900, Tatsuo Ishii wrote:
> > On Mon, Oct 16, 2006 at 03:20:39PM +0900, Tatsuo Ishii wrote:
> > > > Hello,
> > > > 
> > > > I noticed that pgpool does some SQL source filtering in order to
> > > > discover whether a transaction is read-only or not.  Could we see
> > > > about changing this so that people would set the transaction to be
> > > > READ ONLY when people want it to be read-only?  That way, there
> > > > would be a short and deterministic step rather than a long one
> > > > involving parsing SQL.
> > > > 
> > > > Could this go into the next version of pgpool?
> > > 
> > > But in order to know if the transaction is read-only, we need to
> > > issue show transaction_read_only, which might be costy than parsing
> > > SQL. No?
> > 
> > I think it would be fairly simple to catch the SET TRANSACTION call :)
> 
> What if default_transaction_read_only is set to on in postgresql.conf?

It should be possible to read this when setting up the connection.
That would tell you in advance what you need to check for at the
beginning of a transaction :)

Regards,
David.
-- 
David Fetter <david at fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!


More information about the Pgpool-hackers mailing list