aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-04-12 15:04:47 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-04-12 15:04:47 +0000
commit6c6b8f028a82810484a9aafc20e9f0ddebe9e483 (patch)
tree05b8d0437dbd63656f782dca8efdc3200d8bd4fb /src
parenteb19be2e0fc822270364d1f86cb4943b0936710f (diff)
downloadpostgresql-6c6b8f028a82810484a9aafc20e9f0ddebe9e483.tar.gz
postgresql-6c6b8f028a82810484a9aafc20e9f0ddebe9e483.zip
Cancel pending fsync requests during WAL replay of DROP DATABASE, per bug
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.
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/dbcommands.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index e12b7be4070..0ae1b996e4b 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.173.2.2 2007/01/27 20:15:55 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.173.2.3 2007/04/12 15:04:47 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1375,6 +1375,12 @@ dbase_redo(XLogRecPtr lsn, XLogRecord *record)
*/
DropBuffers(xlrec->db_id);
+ /* 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);
+
if (!rmtree(dst_path, true))
ereport(WARNING,
(errmsg("could not remove database directory \"%s\"",