Re: serializable read only deferrable
Kevin Grittner <kevin.grittner@wicourts.gov>
From: "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
To: "Tom Lane" <tgl@sss.pgh.pa.us>
Cc: <drkp@csail.mit.edu>,<pgsql-hackers@postgresql.org>
Date: 2010-12-08T16:56:43Z
Lists: pgsql-hackers
Attachments
- read-only-1.patch (text/plain) patch
I wrote: > Tom Lane <tgl@sss.pgh.pa.us> wrote: > >> 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. > > Agreed. I can create a patch today to implement this. Attached. Accomplished more through mimicry (based on setting transaction isolation level) than profound understanding of the code involved; but it passes all regression tests on both `make check` and `make installcheck-world`. This includes a new regression test that an attempt to change it after a query fails. I've poked at it with various ad hoc tests, and it is behaving as expected in those. I wasn't too confident how to word the new failure messages. -Kevin