"Pavan Deolasee" <pavan.deolasee@gmail.com> writes:
> On Wed, Mar 12, 2008 at 9:27 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> and it would have problems with a slow transaction
>> generating a sparse set of subtransaction XIDs.
> I agree thats the worst case. But is that common ? Thats what I
> was thinking when I proposed the alternate solution. I thought that can
> happen only if most of the subtransactions abort, which again I thought
> is not a normal case.
No, I was thinking of the case where other sessions are chewing up XIDs
while the lots-of-subtransactions transaction runs. If it's slow
enough, there could be very large gaps between the XIDs it acquires for
its subtransactions. So you'd have a situation where the exact same
transaction processing might or might not run out of memory depending
on what else happened meanwhile. Not a very pleasant property.
regards, tom lane