aboutsummaryrefslogtreecommitdiff
path: root/src/backend/postmaster/pgstat.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-02-09 16:12:19 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-02-09 16:12:19 +0000
commitf44271176e857dd7b5adb4e70e10510e1638c9d1 (patch)
treef07dfddaf76340bfcf0b4eb12d2ff0fa978823e8 /src/backend/postmaster/pgstat.c
parentc138b966d42e69446b52a3e65a596f0401c41a33 (diff)
downloadpostgresql-f44271176e857dd7b5adb4e70e10510e1638c9d1.tar.gz
postgresql-f44271176e857dd7b5adb4e70e10510e1638c9d1.zip
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.
Diffstat (limited to 'src/backend/postmaster/pgstat.c')
-rw-r--r--src/backend/postmaster/pgstat.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c
index f64e02020a8..56ee4916d92 100644
--- a/src/backend/postmaster/pgstat.c
+++ b/src/backend/postmaster/pgstat.c
@@ -13,7 +13,7 @@
*
* Copyright (c) 2001-2007, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.145 2007/02/07 23:11:29 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.146 2007/02/09 16:12:18 tgl Exp $
* ----------
*/
#include "postgres.h"
@@ -153,7 +153,6 @@ static void force_statwrite(SIGNAL_ARGS);
static void pgstat_beshutdown_hook(int code, Datum arg);
static PgStat_StatDBEntry *pgstat_get_db_entry(Oid databaseid, bool create);
-static void pgstat_drop_database(Oid databaseid);
static void pgstat_write_statsfile(void);
static HTAB *pgstat_read_statsfile(Oid onlydb);
static void backend_read_statsfile(void);
@@ -820,7 +819,7 @@ pgstat_collect_oids(Oid catalogid)
* via future invocations of pgstat_vacuum_tabstat().)
* ----------
*/
-static void
+void
pgstat_drop_database(Oid databaseid)
{
PgStat_MsgDropdb msg;