Benjamin Minshall <minshall@xxxxxxxxxxxxxx> writes: > When I checked on the server this morning, the huge stats file has > returned to a normal size. I set up a script to track CPU usage and > stats file size, and it appears to have decreased from 90MB down to > about 2MB over roughly 6 hours last night. The CPU usage of the stats > collector also decreased accordingly. > The application logs indicate that there was no variation in the > workload over this time period, however the file size started to > decrease soon after the nightly pg_dump backups completed. Coincidence > perhaps? Well, that's pretty interesting. What are your vacuuming arrangements for this installation? Could the drop in file size have coincided with VACUUM operations? Because the ultimate backstop against bloated stats files is pgstat_vacuum_tabstat(), which is run by VACUUM and arranges to clean out any entries that shouldn't be there anymore. It's sounding like what you had was just transient bloat, in which case it might be useful to inquire whether anything out-of-the-ordinary had been done to the database right before the excessive-CPU-usage problem started. regards, tom lane