Re: Hot Standby 0.2.1 - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Hot Standby 0.2.1
Date
Msg-id 1253539381.4449.55.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Hot Standby 0.2.1  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Mon, 2009-09-21 at 13:50 +0300, Heikki Linnakangas wrote:
> The documentation talks about setting and checking
> default_transaction_read_only, but I think it doesn't say anything
> about
> transaction_read_only, which I find odd. This in particular:
> 
> > Users will be able to tell whether their session is read-only by
> > +   issuing SHOW default_transaction_read_only
> 
> seems misleading, as you might have default_transaction_read_only=on,
> but still be able to do "SET transaction_read_only", so the *session*
> isn't necessarily read-only.

Yes, clearly missing a check there. Those two operations should be
blocked at higher level, using PreventCommandDuringRecovery() and I
confess that I thought they already were. Doesn't crash because of the
other checks in place, but gives wrong error message.

Thanks for penetration testing the patch.

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Hot Standby 0.2.1
Next
From: Peter Eisentraut
Date:
Subject: Re: WIP: generalized index constraints