Running vacuum on two specific tables in my postgresql 10 database results in the following error:
VACUUM (FULL|ANALYZE|FREEZE|) table;
ERROR: uncommitted xmin 359569171 from before xid cutoff 435784199 needs to be frozen
The tables are otherwise functioning, I can query/insert/update them (I can query the whole tables without any error). I can also REINDEX them. However, this error stops the nightly VACUUM ANALYZE on the whole database prematurely. The xmin value value seems to be constant, the cutoff value increases monotonously.
How can I fix this? From the very few instances on the web with a similar error, (e.g. https://stackoverflow.com/questions/50354521/postgres-corruption-error-duplicate-rows-with-the-same-primary-key), it seems there should be some bad rows, but I cannot seem to find them.
SELECT * FROM pg_prepared_xacts ;
returns nothing). – P.Péter Sep 3 '19 at 7:10SELECT * FROM pg_stat_activity WHERE backend_xmin = 359569171
? – Patrick Mevzek Sep 10 '19 at 16:27