Analyze during a transaction

Started by bobJobSover 12 years ago2 messagesgeneral
Jump to latest
#1bobJobS
russelljanusz@yahoo.com

I am running Postgres 9.3 on RedHat Linux 5.6.

During the transaction data is deleted from our database, then an analyze is
performed.

If I analyze our database during a transaction and the transaction fails
(rollback occurs), with the table statistics rollback to their original
values?

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Analyze-during-a-transaction-tp5775069.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2Peter Eisentraut
peter_e@gmx.net
In reply to: bobJobS (#1)
Re: Analyze during a transaction

On 10/18/13 12:28 PM, bobJobS wrote:

If I analyze our database during a transaction and the transaction fails
(rollback occurs), with the table statistics rollback to their original
values?

Yes.

ANALYZE isn't really that special. It reads data from some tables, does
some math on it, and writes the results to other tables (pg_statistic).
All of that is subject to transaction semantics.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general