mirror of
https://github.com/postgres/postgres.git
synced 2025-05-31 03:21:24 +03:00
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.
This commit is contained in:
parent
eb19be2e0f
commit
6c6b8f028a
@ -15,7 +15,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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);
|
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))
|
if (!rmtree(dst_path, true))
|
||||||
ereport(WARNING,
|
ereport(WARNING,
|
||||||
(errmsg("could not remove database directory \"%s\"",
|
(errmsg("could not remove database directory \"%s\"",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user