Обсуждение: transaction ID wraparound - should I use 'VACUUM' or 'VACUUM FULL' ?

Поиск
Список
Период
Сортировка

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

От
Michal Szymanski
Дата:
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

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

От
Alvaro Herrera
Дата:
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.

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

От
Tom Lane
Дата:
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

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

От
Michal Szymanski
Дата:
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