Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm unsure from the documentation and wiki if a serializable read only deferrable select, a SELECT preceded by SET TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE, will block a serializable write.

In this case, the read is a straight select. Will it acquire a lock? Will concurrent serializable writes fail?

share|improve this question
What's a "deferrable select"? Documentation/wiki links in question? Are you talking about SERIALIZABLE isolation? –  Craig Ringer Jul 4 at 0:45
@CraigRinger Sorry about that Craig Ringer! I've edited to hopefully give clarity with more proper terminology. –  Cincinnatus Jul 4 at 1:14
The docs are .. underwhelming .. on this point. In your position I'd be setting up some test cases. Also submitting a docs patch once I'd figured it out ;-) –  Craig Ringer Jul 4 at 4:38
@CraigRinger Can you give me a hint on how to setup the test? That would be cool to update the docs! –  Cincinnatus Jul 4 at 14:47
Check out isolationtester in the PostgreSQL source code. Very handy for writing/automating tests that involve concurrent transactions. Or use this trick: stackoverflow.com/q/16161762/398670 as demoed here: stackoverflow.com/a/12456645/398670 –  Craig Ringer Jul 4 at 16:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.