diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-04-12 15:04:35 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-04-12 15:04:35 +0000 |
commit | ebb6bae539e124c34674ecf0d0f387e0a873c314 (patch) | |
tree | e883a386ae4b3a7a52b00d49ce31980665cd48a5 /src/backend/commands/dbcommands.c | |
parent | b60ddffa93715a4a79a4a24d9a8dd266f90d9dd2 (diff) | |
download | postgresql-ebb6bae539e124c34674ecf0d0f387e0a873c314.tar.gz postgresql-ebb6bae539e124c34674ecf0d0f387e0a873c314.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/backend/commands/dbcommands.c')
-rw-r--r-- | src/backend/commands/dbcommands.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index de4b239893a..ca04444f2f0 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.193 2007/03/13 00:33:39 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.194 2007/04/12 15:04:35 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1439,6 +1439,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); |