> > Huh. Heap_insert writes to disk, but there it is not used unless the
> > transaction gets committed, right?
> >
>
> This could occur only in vacuum.
> There's a quick hack in vc_rpfheap().
>
> if (num_moved > 0)
> {
>
> /*
> * We have to commit our tuple' movings before we'll
> truncate
> * relation, but we shouldn't lose our locks. And so - quick
> hac
> k:
> * flush buffers and record status of current transaction as
> * committed, and continue. - vadim 11/13/96
> */
> FlushBufferPool(!TransactionFlushEnabled());
> TransactionIdCommit(myXID);
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> FlushBufferPool(!TransactionFlushEnabled());
> }
>
> vc_updstats() may be called in the already committed transaction.
Oh, that is tricky that they have committed the transaction and continue
working in an already committed. Yikes. Any idea why we have to commit
it early?
-- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026