*** pgsql/src/backend/commands/dbcommands.c 2008/04/16 23:59:51 1.204.2.1 --- pgsql/src/backend/commands/dbcommands.c 2008/04/18 06:48:50 1.204.2.2 *************** *** 13,19 **** * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.204 2008/01/01 19:45:48 momjian Exp $ * *------------------------------------------------------------------------- */ --- 13,19 ---- * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.204.2.1 2008/04/16 23:59:51 tgl Exp $ * *------------------------------------------------------------------------- */ *************** dropdb(const char *dbname, bool missing_ *** 714,731 **** pgstat_drop_database(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. */ - #ifdef WIN32 RequestCheckpoint(CHECKPOINT_IMMEDIATE | CHECKPOINT_FORCE | CHECKPOINT_WAIT); - #endif /* * Remove all tablespace subdirs belonging to the database. --- 714,733 ---- pgstat_drop_database(db_id); /* ! * Tell bgwriter to forget any pending fsync and unlink requests for files ! * in the database; else the fsyncs will fail at next checkpoint, or worse, ! * it will delete files that belong to a newly created database with the ! * same OID. */ ForgetDatabaseFsyncRequests(db_id); /* ! * Force a checkpoint to make sure the bgwriter has received the message ! * sent by ForgetDatabaseFsyncRequests. On Windows, this also ensures that ! * the bgwriter doesn't hold any open files, which would cause rmdir() to ! * fail. */ RequestCheckpoint(CHECKPOINT_IMMEDIATE | CHECKPOINT_FORCE | CHECKPOINT_WAIT); /* * Remove all tablespace subdirs belonging to the database.