Thread: Malfunction in dropping database with pgAdmin

Malfunction in dropping database with pgAdmin

From
Sergei Abramov
Date:
Platform: Windows XP, 5.1 (Build 2600).Language: Russain.
Distribution used: Binary.
pgAdmin version: 1.10.0.
PostgreSQL version: 8.4.0-1.

Bug description: When I use menu command 'Delete/drop' to drop database, 
PostgreSQL server reports:
WARNING: could not remove file or directory "base/16435": Directory not 
empty
WARNING: some useless files may be left behind in old database directory 
"base/16435".

However, specified directory appears empty and I have to delete it 
manually.
Database cluster is situated on local NTFS-drive.


Re: Malfunction in dropping database with pgAdmin

From
Guillaume Lelarge
Date:
Le lundi 10 août 2009 à 08:24:30, Sergei Abramov a écrit :
> Platform: Windows XP, 5.1 (Build 2600).Language: Russain.
> Distribution used: Binary.
> pgAdmin version: 1.10.0.
> PostgreSQL version: 8.4.0-1.
>
> Bug description: When I use menu command 'Delete/drop' to drop database,
> PostgreSQL server reports:
> WARNING: could not remove file or directory "base/16435": Directory not
> empty
> WARNING: some useless files may be left behind in old database directory
> "base/16435".
>

This has nothing to do with pgAdmin. I think you have a much bigger problem
with your server.

> However, specified directory appears empty and I have to delete it
> manually.

You should NEVER delete anything manually. I mean anything under base
directory.

> Database cluster is situated on local NTFS-drive.


--
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com


Re: Malfunction in dropping database with pgAdmin

From
Guillaume Lelarge
Date:
Le lundi 10 août 2009 à 11:41:40, Sergei Abramov a écrit :
> I am afraid error is connected with pgAdmin because 'dropdb' does not
> have this shortcoming...

The error messages you paste in your previous mail have nothing to with
pgAdmin. They are server messages. pgAdmin don't delete directories or files
in $PGDATA.

> Test were repeated in Windows 2000 FAT-filesystem with the failure as
> the result.

Are you sure it was a FAT filesystem? Because you shouldn't run postgres on
this kind of filesystem. You have to use NTFS.

> Try to create database and then immediately drop it...

I've checked and it worked. With 8.3 and 8.4 PostgreSQL, and pgAdmin 1.10, and
Linux (I don't have a Windows system nearby to check on it.).


--
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com


Re: Malfunction in dropping database with pgAdmin

From
Guillaume Lelarge
Date:
Le lundi 10 août 2009 à 15:48:39, Sergei Abramov a écrit :
> Database dropping INITIATED BY pgAdmin leads to unability for SERVER
> (not pgAdmin itself, surely!) to purify database folder. Both in Windows
> XP and Windows 2000, both NTFS- and FAT-filesystems, the latter being
> used just for experiment. If you don't care about this problem I won't
> disturb you...

I do care, and that's why we've got this whole conversation.


--
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com


Re: Malfunction in dropping database with pgAdmin

From
Dave Page
Date:
On Mon, Aug 10, 2009 at 7:51 PM, Guillaume
Lelarge<guillaume@lelarge.info> wrote:
> Le lundi 10 août 2009 à 15:48:39, Sergei Abramov a écrit :
>> Database dropping INITIATED BY pgAdmin leads to unability for SERVER
>> (not pgAdmin itself, surely!) to purify database folder. Both in Windows
>> XP and Windows 2000, both NTFS- and FAT-filesystems, the latter being
>> used just for experiment. If you don't care about this problem I won't
>> disturb you...

pgAdmin, psql, and dropdb will *all* drop the database by issuing a
DROP DATABASE query via libpq. There is no difference between them,
except possibly the database to which they initially connect. By
default all will use 'postgres'.

Even if there is a difference in database you are using for the
connection, then it is still a server issue, and should be reported to
pgsql-bugs@postgresql.org.

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com