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:53 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-04-18 17:05:53 +0000
commit2101518516ff6bc2c21b7fb1323a409d09990014 (patch)
tree33d3e904689a66ec528835ad34eb707b18a0557a /src/backend/commands/dbcommands.c
parentb8c5823082269cfd7343535beccd704943ef1432 (diff)
downloadpostgresql-2101518516ff6bc2c21b7fb1323a409d09990014.tar.gz
postgresql-2101518516ff6bc2c21b7fb1323a409d09990014.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 9596bf48081..3869b041966 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.204.2.2 2008/04/18 06:48:50 heikki Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.204.2.3 2008/04/18 17:05:53 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1320,7 +1320,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 */
@@ -1489,7 +1489,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)));
}
@@ -1528,7 +1528,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