SSI future enhancement: de facto read only optimization

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Dan Ports" <drkp(at)csail(dot)mit(dot)edu>,<pgsql-hackers(at)postgresql(dot)org>
Subject: SSI future enhancement: de facto read only optimization
Date: 2011-01-24 23:36:39
Message-ID: 4D3DB8A70200002500039B82@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Just to put this on the record for 9.2: I've just thought of a way
to further extend the READ ONLY optimizations to de facto READ ONLY
transactions. Right now, when a dangerous structure is formed with
three transactions (which consists of read-write dependencies from
T0 -> T1 -> T2) and T2 is committed, we have an optimization where
we recognize that nothing needs to be rolled back if T0 is READ ONLY
and overlaps T2. We could extend this to de facto READ ONLY
transactions (those which don't write to a permanent table, but fail
to declare that up-front) where T0 overlaps T2 by holding off on
rolling anything back until T2 actually does a write. We already
have flags which track the relevant data, and we already use them to
optimize de facto read only transactions where T0 commits before T1;
but we could avoid a few false positives with this additional
optimization.

Definitely too late in the release cycle to be trying to add a new
optimization, though.

-Kevin

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2011-01-25 00:01:01 pgindent and line length
Previous Message Heikki Linnakangas 2011-01-24 21:02:08 Re: Allowing multiple concurrent base backups