Re: [HACKERS] Concurrent VACUUM: first results - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Concurrent VACUUM: first results
Date
Msg-id 199911260509.AAA27725@candle.pha.pa.us
Whole thread Raw
In response to RE: [HACKERS] Concurrent VACUUM: first results  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-hackers
> > 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
 


pgsql-hackers by date:

Previous
From: "Hiroshi Inoue"
Date:
Subject: RE: [HACKERS] Concurrent VACUUM: first results
Next
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] Concurrent VACUUM: first results