Tom Lane wrote:
Chris Browne <[EMAIL PROTECTED]> writes:
Note that we required that the "provider transaction" have the
attributes IsXactIsoLevelSerializable and XactReadOnly both being
true, so we have the mandates that the resultant backend process:

a) Is in read only mode, and
b) Is in serializable mode.

If XactReadOnly were a "hard" read only constraint, that argument
might be worth the electrons it's written on.  I quote TFM:

Now I think someone was looking into a "hard" read only mode for
use in doing read-only queries against a PITR slave; if that
ever happens it might be adaptable to serve this purpose too.
But we haven't got it today.

That would haven been me then ;-)

I think that lazy xid assignment actually got us 90% of the way towards
a "hard" transaction read-only constraint - nearly all data-modfying operation surely depend on the xact having an xid assigned, no? (The only exception might be nextval() and friends).

I seem to remember there being some pushback to the idea of changing the semantics of "set transaction isolation read only" from "soft" to "hard" semantics though - on the basis that it might break existing applications. If that has changed (or my memory tricks me ;-) ) I'd volunteer to create a patch for 8.4 to make "set transaction read only" a hard constraint.

regards, Florian Pflug

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to