Re: [ADMIN] WARNING: database must be vacuumed within 8439472 transactions - Mailing list pgsql-general

From Matheus de Oliveira
Subject Re: [ADMIN] WARNING: database must be vacuumed within 8439472 transactions
Date
Msg-id CAJghg4KDW0rhGHsvw-wb0PcL5Zzj_VJ4+NTowZ=30okWAPUzkw@mail.gmail.com
Whole thread Raw
In response to WARNING: database must be vacuumed within 8439472 transactions  (Prabhjot Sheena <prabhjot.sheena@rivalwatch.com>)
List pgsql-general

On Mon, Jul 7, 2014 at 4:56 PM, Prabhjot Sheena <prabhjot.sheena@rivalwatch.com> wrote:
       We are using postgresql 8.3 database for last 5 yrs for this production database and its running fine.

Man. You really should consider upgrading to a more recent version. If you are running "fine" with 8.3 you'll be running fantastically fine on 9.3... :-)

Also, 8.3 is EOL now. People shouldn't be using it anymore.
 
This is our critical database which runs 24*7. This weekend we started getting these messages

HINT:  To avoid a database shutdown, execute a full-database VACUUM.
WARNING:  database  must be vacuumed within 8439472 transactions

i am currently running this command

vacuumdb --analyze db

while this command is running i m still getting these messages

WARNING:  database  must be vacuumed within 2645303 transactions.


If your VACUUM is still running, it may be a simple problem of waiting it (and hopping for it to finish before you run out of transactions). You shouldn't be using --analyze there, because it is not necessary for this case and may slow down the VACUUM.

Another problem you need to consider is that if there is a really old transaction (about 2bi old) opened that is preventing VACUUM to lower relfrozenxid on tables. To do this you first need to check for very old sessions at pg_stat_activity and also (if you use prepared transaction) query pg_prepared_xacts, if something old is there you must finish it either with ROLLBACK PREPARED or (less likely) COMMIT PREPARED.

Regards,
--
Matheus de Oliveira
Analista de Banco de Dados
Dextra Sistemas - MPS.Br nível F!
www.dextra.com.br/postgres

pgsql-general by date:

Previous
From: Prabhjot Sheena
Date:
Subject: Re: [ADMIN] WARNING: database must be vacuumed within 8439472 transactions
Next
From: Tom Lane
Date:
Subject: Re: [ADMIN] WARNING: database must be vacuumed within 8439472 transactions