]> granicus.if.org Git - postgresql/commitdiff
Cancel pending fsync requests during WAL replay of DROP DATABASE, per bug
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 12 Apr 2007 15:04:41 +0000 (15:04 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 12 Apr 2007 15:04:41 +0000 (15:04 +0000)
report from David Darville.  Back-patch as far as 8.1, which may or may not
have the problem but it seems a safe change anyway.

src/backend/commands/dbcommands.c

index 4a11d0c419bb20e5231c70200ec241e1e921620e..fdd5e32b37b1d02bfbb36346ca2235f5b59de333 100644 (file)
@@ -13,7 +13,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.187.2.1 2007/01/27 20:15:47 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.187.2.2 2007/04/12 15:04:41 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1438,6 +1438,9 @@ dbase_redo(XLogRecPtr lsn, XLogRecord *record)
                /* Also, clean out any entries in the shared free space map */
                FreeSpaceMapForgetDatabase(xlrec->db_id);
 
+               /* Also, clean out any fsync requests that might be pending in md.c */
+               ForgetDatabaseFsyncRequests(xlrec->db_id);
+
                /* Clean out the xlog relcache too */
                XLogDropDatabase(xlrec->db_id);