transaction ID wraparound - should I use 'VACUUM' or 'VACUUM FULL' ?

Started by Michal Szymanskiover 16 years ago4 messagesgeneral
Jump to latest
#1Michal Szymanski
dyrex@poczta.onet.pl

Hi,
In old version of Postgres we have to execute 'VACUUM FULL' to solve
problem of transaction ID wraparound, do we need to execute 'VACUUM
FULL' in Postgres 8.3 or 8.4 to avoid this problem?
How to check using SQL if transaction ID is close to wraparound?

Michal Szymanski
http://blog.szymanskich.net

#2Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Michal Szymanski (#1)
Re: transaction ID wraparound - should I use 'VACUUM' or 'VACUUM FULL' ?

Michal Szymanski wrote:

Hi,
In old version of Postgres we have to execute 'VACUUM FULL' to solve
problem of transaction ID wraparound, do we need to execute 'VACUUM
FULL' in Postgres 8.3 or 8.4 to avoid this problem?

No, plain VACUUM suffices.

How to check using SQL if transaction ID is close to wraparound?

See age(datfrozenxid) FROM pg_database, but ignore system databases.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alvaro Herrera (#2)
Re: transaction ID wraparound - should I use 'VACUUM' or 'VACUUM FULL' ?

Alvaro Herrera <alvherre@commandprompt.com> writes:

Michal Szymanski wrote:

In old version of Postgres we have to execute 'VACUUM FULL' to solve
problem of transaction ID wraparound, do we need to execute 'VACUUM
FULL' in Postgres 8.3 or 8.4 to avoid this problem?

No, plain VACUUM suffices.

Just to clarify: plain VACUUM has always sufficed; in *no* version of
Postgres has it ever been the case that VACUUM FULL was more useful
than VACUUM to protect against wraparound.

regards, tom lane

#4Michal Szymanski
dyrex@poczta.onet.pl
In reply to: Michal Szymanski (#1)
Re: transaction ID wraparound - should I use 'VACUUM' or 'VACUUM FULL' ?

On 10 Paź, 04:38, t...@sss.pgh.pa.us (Tom Lane) wrote:

Alvaro Herrera <alvhe...@commandprompt.com> writes:

Michal Szymanski wrote:

In old version of Postgres we have to execute 'VACUUM FULL' to solve
problem of  transaction ID wraparound, do we need to execute 'VACUUM
FULL' in Postgres 8.3 or 8.4 to avoid this problem?

No, plain VACUUM suffices.

Just to clarify: plain VACUUM has always sufficed; in *no* version of
Postgres has it ever been the case that VACUUM FULL was more useful
than VACUUM to protect against wraparound.

                        regards, tom lane

For me it was clear that plain VACUUM is enough but my friend had
situation when wraparound happend when he used plain vaccum after
'vacuum full' prblem was solved. I will change our vacuum full to
plain vacuum and we will see what happen.

Regards
Michal Szymanski