Re: BUG #5367: TEMP TABLES with ON COMMIT DELETE ROWS and different pg_stat features - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5367: TEMP TABLES with ON COMMIT DELETE ROWS and different pg_stat features
Date
Msg-id 12530.1268152564@sss.pgh.pa.us
Whole thread Raw
In response to BUG #5367: TEMP TABLES with ON COMMIT DELETE ROWS and different pg_stat features  ("Boguk Maxim" <Maxim.Boguk@gmail.com>)
List pgsql-bugs
"Boguk Maxim" <Maxim.Boguk@gmail.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

pgsql-bugs by date:

Previous
From: Andrea Suisani
Date:
Subject: Re: duplicate key violates unique contraint on pg_type_typname_nsp_index
Next
From: Tom Lane
Date:
Subject: Re: Bug in triggers