Re: [GENERAL] WARNING: could not remove database directory

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Hubert Fröhlich <hubert(dot)froehlich(at)bvv(dot)bayern(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [GENERAL] WARNING: could not remove database directory
Date: 2005-02-11 18:36:21
Message-ID: 12436.1108146981@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Tom Lane wrote:
>> [ looks at code... ] dbcommands.c is expecting that rmtree() will have
>> printed out a more-detailed message about the problem, but someone has
>> carefully removed every trace of error reporting from rmtree().

> I think the issue is that we didn't want different object files for
> client and server output message and and returning error codes and
> having every calling location print strings was unmaintainable.

But we already bit that bullet. Look at the other routines in dirmod.c:

#ifndef FRONTEND
ereport(ERROR,
(errcode_for_file_access(),
errmsg("Error setting junction for %s: %s",
nativeTarget, msg)));
#else
fprintf(stderr, "Error setting junction for %s: %s\n",
nativeTarget, msg);
#endif

It's certainly not realistic to pass back enough information from
rmtree() to let the caller print a useful error message, so I think
we have to add reporting code along this line to rmtree().

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2005-02-11 18:41:44 Re: size in bytes of a table?
Previous Message Bruce Momjian 2005-02-11 18:29:54 Re: [GENERAL] WARNING: could not remove database directory

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-02-11 18:43:31 Re: [GENERAL] WARNING: could not remove database directory
Previous Message Bruce Momjian 2005-02-11 18:29:54 Re: [GENERAL] WARNING: could not remove database directory