Remove pgstat's discrimination against MsgVacuum and MsgAnalyze messages.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 4 Sep 2009 22:32:33 +0000 (22:32 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 4 Sep 2009 22:32:33 +0000 (22:32 +0000)
commit8cf86e67fd99f778d60173892614523f14cc34ee
tree3155e76ebabf0170c295fd5cf6f79ebfb5b7a189
parentcfe57c7893ad43fb3adf01f9ded266b0c7de782a
Remove pgstat's discrimination against MsgVacuum and MsgAnalyze messages.

Formerly, these message types would be discarded unless there was already
a stats hash table entry for the target table.  However, the intent of
saving hash table space for unused tables was subverted by the fact that
the physical I/O done by the vacuum or analyze would result in an immediately
following tabstat message, which would create the hash table entry anyway.
All that we had left was surprising loss of statistical data, as in a recent
complaint from Jaime Casanova.

It seems unlikely that a real database would have many tables that go totally
untouched over the long haul, so the consensus is that this "optimization"
serves little purpose anyhow.  Remove it, and just create the hash table
entry on demand in all cases.
src/backend/postmaster/pgstat.c