Re: [HACKERS] Concurrent VACUUM: first results

Vadim Mikheev <vadim@krs.ru>

From: Vadim Mikheev <vadim@krs.ru>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Hiroshi Inoue <Inoue@tpf.co.jp>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgreSQL.org
Date: 1999-11-26T05:32:31Z
Lists: pgsql-hackers
Bruce Momjian wrote:
> 
> > /*
> >  * We have to commit our tuple' movings before we'll truncate
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >  * relation, but we shouldn't lose our locks. And so - quick hack:
       ^^^^^^^^

... or moved tuples may be lost in the case of DB/OS crash etc
    that may occur after truncation but before commit...

> >  * 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?

Vadim