Re: [ADMIN] WARNING: database must be vacuumed within 8439472 transactions

From: Matheus de Oliveira <matioli(dot)matheus(at)gmail(dot)com>
To: Prabhjot Sheena <prabhjot(dot)sheena(at)rivalwatch(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>, Forums postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: [ADMIN] WARNING: database must be vacuumed within 8439472 transactions
Date: 2014-07-07 22:10:36
Message-ID: CAJghg4KDW0rhGHsvw-wb0PcL5Zzj_VJ4+NTowZ=30okWAPUzkw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

On Mon, Jul 7, 2014 at 4:56 PM, Prabhjot Sheena <
prabhjot(dot)sheena(at)rivalwatch(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2014-07-07 22:51:16 Re: [GENERAL] WARNING: database must be vacuumed within 8439472 transactions
Previous Message Prabhjot Sheena 2014-07-07 21:14:50 Re: [GENERAL] WARNING: database must be vacuumed within 8439472 transactions

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-07-07 22:51:16 Re: [GENERAL] WARNING: database must be vacuumed within 8439472 transactions
Previous Message Prabhjot Sheena 2014-07-07 21:14:50 Re: [GENERAL] WARNING: database must be vacuumed within 8439472 transactions