Search code examples
postgresqlvacuumautovacuum

PostgreSQL failed with vacuum and autovacuum


Postgres v11.9

There are many errors on Postgres log like this:

    2020-09-05 17:35:37 GMT [22464]: @: [6-1] ERROR:  uncommitted xmin 636700836 from before xid cutoff 809126794 needs to be frozen
2020-09-05 17:35:37 GMT [22464]: @: [7-1] CONTEXT:  automatic vacuum of table "table_nane"

Manual vacuum fails with this error too.

What can I do to fix this error?


Solution

    • Export the database with pg_dump.

    • Create a new database cluster and restore the dump into it.

    • Remove the original database cluster.