diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-04-12 15:04:41 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-04-12 15:04:41 +0000 |
commit | 707964b6a87f03675396c5ecfed411902a1f6232 (patch) | |
tree | ebbf9012d04157ec3fd7d8f12ed90f19d6650fa4 /src/backend/commands/dbcommands.c | |
parent | 627939c3379faaa6d9b62f20414687129a25f854 (diff) | |
download | postgresql-707964b6a87f03675396c5ecfed411902a1f6232.tar.gz postgresql-707964b6a87f03675396c5ecfed411902a1f6232.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 4a11d0c419b..fdd5e32b37b 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.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); |