Re: serializable read only deferrable - Mailing list pgsql-hackers

From Tom Lane
Subject Re: serializable read only deferrable
Date
Msg-id 2844.1291772173@sss.pgh.pa.us
Whole thread Raw
In response to Re: serializable read only deferrable  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: serializable read only deferrable  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Oh, I just went through the code on setting READ ONLY and discovered
> that contrary to the standard *and* the PostgreSQL documentation,
> you can change the status of a transaction between READ ONLY and
> READ WRITE at will.  Yeah, that's a problem for my intended use.
> Many optimizations would need to go right out the window, and the
> false positive rate under SSI would be high.

I believe you had better support the locution
begin;set transaction read only;...

I agree that letting it be changed back to read/write after that is
surprising and unnecessary.  Perhaps locking down the setting at the
time of first grabbing a snapshot would be appropriate.  IIRC that's
how it works for transaction isolation level, and this seems like it
ought to work the same.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Final(?) proposal for wal_sync_method changes
Next
From: Robert Haas
Date:
Subject: Re: Review: Extensions Patch