Call pgstat_drop_database during DROP DATABASE, so that any stats file

Tom Lane <tgl@sss.pgh.pa.us>

Commit: f44271176e857dd7b5adb4e70e10510e1638c9d1
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2007-02-09T16:12:19Z
Releases: 8.3.0
Call pgstat_drop_database during DROP DATABASE, so that any stats file
entries for the victim database go away sooner rather than later.  We already
did the equivalent thing at the per-relation level, not sure why it's not
been done for whole databases.  With this change, pgstat_vacuum_tabstat
should usually not find anything to do; though we still need it as a backstop
in case DROPDB or TABPURGE messages get lost under load.

Files

PathChange+/−
src/backend/commands/dbcommands.c modified +7 −1
src/backend/postmaster/pgstat.c modified +2 −3
src/include/pgstat.h modified +2 −1