Ole Gjerde wrote:
>
> Now I have a bit of a bigger problem. I just did a pg_upgrade to a newer
> CVS version. Most of my tables seems fine and vacuum worked fine on most
> of them.
> But on the only 2 tables that I have changed lately I'm getting vacuum
> "errors". Both tables are very small(shotgun table file is 1.4MB).
> If I keep running vacuum(over and over) the number of deleted tuples will
> eventually go to 0 and it will look normal. It does take a few vacuum
> runs however, so something really weird is going on here.
>
> shotgun=> vacuum verbose analyze shotgun;
> NOTICE: --Relation shotgun--
> NOTICE: Pages 334: Changed 0, Reapped 5, Empty 0, New 0; Tup 22414: Vac
> 3, Keep/VTL 11708/10895, Crash 0, UnUsed 49, MinLen 64, MaxLen 159;
> Re-using: Free/Avail. Space 6556/492; EndEmpty/Avail. Pages 0/3. Elapsed
> 0/0 sec.
> NOTICE: Index shotgun_index_keyword: Pages 180; Tuples 22274: Deleted 3.
> Elapsed 0/0 sec.
> NOTICE: Index shotgun_index_keyword: NUMBER OF INDEX' TUPLES (22274) IS
> NOT THE SAME AS HEAP' (22414)
Hiroshi found the bug in vacuum and posted me patch, but I'm
unhappy with it and will commit my changes in a few hours.
Vadim