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

From Bruce Momjian
Subject Re: [HACKERS] Concurrent VACUUM: first results
Date
Msg-id 199911251819.NAA10070@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Concurrent VACUUM: first results  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses RE: [HACKERS] Concurrent VACUUM: first results  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-hackers
> "Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> > CommitTransactionCommand() is executed at the end of vc_getrels()
> > and vc_delhilowstats() is executed without StartTransactionCommand().
> 
> Oooh, good eye!  I wonder how long that bug's been there?
> 
> I'm still inclined to remove that call to vc_delhilowstats, because it
> seems like a global delete of statistics can't help but be a problem.
> But if we keep it, you're dead right: it has to be inside a transaction.
> 

With the new pg_statistic cache, you can efficiently do a heap_insert or
heap_replace dending on whether an entry already exists.  In the old
code, that was hard because you had to scan entire table looking for a
match so I just did a delete, and they I knew to do an insert.

--  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: Michael Meskes
Date:
Subject: Re: [HACKERS] pid file for postmaster?
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Vacuum