aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/dbcommands.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-04-18 17:05:45 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-04-18 17:05:45 +0000
commitb8e5581d762acceda22dd7347ed43d2e013a6df1 (patch)
treed86cf7b85b76240859680df5048ba75dcedd5e55 /src/backend/commands/dbcommands.c
parent9cb91f90c95906347cd4d42fcf24a12a6e6a679e (diff)
downloadpostgresql-b8e5581d762acceda22dd7347ed43d2e013a6df1.tar.gz
postgresql-b8e5581d762acceda22dd7347ed43d2e013a6df1.zip
Fix rmtree() so that it keeps going after failure to remove any individual
file; the idea is that we should clean up as much as we can, even if there's some problem removing one file. Make the error messages a bit less misleading, too. In passing, const-ify function arguments.
Diffstat (limited to 'src/backend/commands/dbcommands.c')
-rw-r--r--src/backend/commands/dbcommands.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index 7055b0fe98e..6707e9e6656 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.207 2008/04/18 06:48:38 heikki Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.208 2008/04/18 17:05:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1321,7 +1321,7 @@ remove_dbtablespaces(Oid db_id)
if (!rmtree(dstpath, true))
ereport(WARNING,
- (errmsg("could not remove database directory \"%s\"",
+ (errmsg("some useless files may be left behind in old database directory \"%s\"",
dstpath)));
/* Record the filesystem change in XLOG */
@@ -1490,7 +1490,7 @@ dbase_redo(XLogRecPtr lsn, XLogRecord *record)
{
if (!rmtree(dst_path, true))
ereport(WARNING,
- (errmsg("could not remove database directory \"%s\"",
+ (errmsg("some useless files may be left behind in old database directory \"%s\"",
dst_path)));
}
@@ -1529,7 +1529,7 @@ dbase_redo(XLogRecPtr lsn, XLogRecord *record)
/* And remove the physical files */
if (!rmtree(dst_path, true))
ereport(WARNING,
- (errmsg("could not remove database directory \"%s\"",
+ (errmsg("some useless files may be left behind in old database directory \"%s\"",
dst_path)));
}
else