diff options
Diffstat (limited to 'src/backend/commands/dbcommands.c')
-rw-r--r-- | src/backend/commands/dbcommands.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index 18340481d23..38db4ae3b92 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -13,7 +13,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.189 2007/01/16 13:28:56 alvherre Exp $ + * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.190 2007/01/17 16:25:01 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -40,6 +40,7 @@ #include "postmaster/bgwriter.h" #include "storage/freespace.h" #include "storage/procarray.h" +#include "storage/smgr.h" #include "utils/acl.h" #include "utils/builtins.h" #include "utils/flatfiles.h" @@ -644,6 +645,12 @@ dropdb(const char *dbname, bool missing_ok) FreeSpaceMapForgetDatabase(db_id); /* + * Tell bgwriter to forget any pending fsync requests for files in the + * database; else it'll fail at next checkpoint. + */ + ForgetDatabaseFsyncRequests(db_id); + + /* * On Windows, force a checkpoint so that the bgwriter doesn't hold any * open files, which would cause rmdir() to fail. */ |