Skip site navigation (1) Skip section navigation (2)

Re: BUG #5367: TEMP TABLES with ON COMMIT DELETE ROWS and different pg_stat features

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Boguk Maxim" <Maxim(dot)Boguk(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5367: TEMP TABLES with ON COMMIT DELETE ROWS and different pg_stat features
Date: 2010-03-09 16:36:04
Message-ID: 12530.1268152564@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Boguk Maxim" <Maxim(dot)Boguk(at)gmail(dot)com> writes:
> When transaction which used TEMP table with ON COMMIT DELETE ROWS commit or
> rollback pg_stats and pg_stat_all_tables about that temporary table doesn't
> reset.

> It's no problem with common applications but with pgbouncer + transaction
> pooling mode postgresql backends staying alive long time and incremental
> errors in statistic about temporary tables leading to choose insane query
> plans and bad performance in general.

With a temp table it's pretty much on your application's head to do
ANALYZE at appropriate times.  There's no way for autovac to do it for
you.  I don't see any point in creating strange corner-case behaviors
in the stats code given the fundamental need for manual ANALYZEs.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2010-03-09 17:02:05
Subject: Re: Bug in triggers
Previous:From: Andrea SuisaniDate: 2010-03-09 16:29:52
Subject: Re: duplicate key violates unique contraint on pg_type_typname_nsp_index

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group