"Steven Flatt" <steven.flatt@xxxxxxxxx> writes: > Here's the output of "VACUUM VERBOSE pg_class". I think it looks fine. I > even did it three times in a row, each about 10 minutes apart, just to see > what was changing: Hm, look at the numbers of rows removed: > INFO: "pg_class": found 5680 removable, 3263 nonremovable row versions in > 625 pages > DETAIL: 0 dead row versions cannot be removed yet. > INFO: "pg_class": found 24 removable, 3263 nonremovable row versions in 625 > pages > DETAIL: 0 dead row versions cannot be removed yet. > INFO: "pg_class": found 0 removable, 3263 nonremovable row versions in 625 > pages > DETAIL: 0 dead row versions cannot be removed yet. The lack of unremovable dead rows is good, but why were there so many dead rows the first time? You didn't say what the cycle time is on your truncate-and-refill process, but the last two suggest that the average rate of accumulation of dead pg_class rows is only a couple per minute, in which case it's been a lot longer than an hour since the previous VACUUM of pg_class. I'm back to suspecting that you don't vacuum pg_class regularly. You mentioned having an hourly cron job to fire off vacuums ... are you sure it's run as a database superuser? regards, tom lane