Re: [HACKERS] Concurrent VACUUM: first results

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Concurrent VACUUM: first results
Date: 1999-11-26 05:09:25
Message-ID: 199911260509.AAA27725@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mike Mascari 1999-11-26 05:12:31 Re: AW: [HACKERS] Re: [GENERAL] drop/rename table and transactions
Previous Message Hiroshi Inoue 1999-11-26 04:51:29 RE: [HACKERS] Concurrent VACUUM: first results