> "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