Stephen Frost <sfrost(at)snowman(dot)net> writes:
> * Mike Mascari (mascarm(at)mascari(dot)com) wrote:
>> And when the transaction that issued the TRUNCATE aborts after step 3,
>> but newer transactions commit?
> The newer transactions would have to check for that situation.
How would they do that? They might be long gone by the time the
truncating transaction rolls back.
It might be possible to do something that preserves full MVCC-ness for
concurrent readers, but I don't believe there is any choice but to lock
out concurrent writers until the truncate commits. If you try to allow
that, there's no way to keep straight whose change goes into which file.
regards, tom lane