postgresqlperformancevacuum

How to execute a vacuum command without warning stops in postgres?


Attempting to vacuum as postgresql database, but it stops after vacuuming about 50 records, with this command/warning:

 backend> vacuum FULL;
 WARNING:  database "postgres" must be vacuumed within 988308 transactions
HINT:  To avoid a database shutdown, execute a full-database VACUUM in "postgres".

backend>

// again

WARNING:  database "postgres" must be vacuumed within 988242 transactions
HINT:  To avoid a database shutdown, execute a full-database VACUUM in "postgres".

How can this be invoked so that it doesn't stop so often? Ty :^)


Solution

  • VACUUM (FULL) is quite different from VACUUM, and is not what is needed in this situation. VACUUM (FULL) is not simply a better VACUUM.

    You have somehow maneuvered yourself into a bad spot. If you don't succeed in running a normal VACUUM on the postgres database within a. million transactions, your database will suffer data loss.

    You have to connect to the postgres database and then run

    VACUUM
    

    There will probably be obstacles that you have to remove first. This could be

    See my blog for more.