Joe Maldonado <joe.maldonado@gmail.com> writes:
> The VACUUM process does not seem to be able to exit, instead it seems to be
> stuck in some strange loop for some time.
> Is this something to be expected?
That trace looks perfectly normal. Try increasing vacuum_mem if you
want fewer tuple-removal cycles.
> INFO: "test_table": found 23357083 removable, 200037 nonremovable row
> versions in 442991 pages
> DETAIL: 200000 dead row versions cannot be removed yet.
> There were 23842917 unused item pointers.
Lessee, 37 live rows and 23.5 million dead ones ... you should consider
vacuuming this table a bit more often ;-)
And yes, you will need a VACUUM FULL to get back down to a reasonable
table size.
regards, tom lane