在win7中删除旧的PostgreSQL数据目录 [英] delete old PostgreSQL data directory in win7

查看:20
本文介绍了在win7中删除旧的PostgreSQL数据目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在 Windows 7 中删除旧数据目录.我已经卸载了 PostgreSQL,但系统服务用户帐户postgres"仍然存在,他是唯一一个对该文件夹具有访问权限的人.

i'm not able to delete my old data directory in windows 7. i already uninstalled PostgreSQL, but there's still the system service user account "postgres", who's the only one with access-rights to the folder.

可能的解决方案是开发一个服务,以postgres"用户身份运行,删除文件夹,但一定有更简单的方法吗?

possible solution would be to develop a service, running as "postgres" user, which deletes the folder, but there must be an easier way?

推荐答案

我没用过 Windows 7,但如果我没记错的话,应该有一种方法可以在Postgres 用户,然后将其删除.

I haven't used Windows 7, but if I recall correctly, there should be a way to start an explorer session (the filemanager, not IE) under the Postgres user and then remove it.

否则,您可以通过以管理员身份登录,为管理员添加修改该目录和父目录的权限,然后您应该可以删除它.

Otherwise, you might be able to, by logging in as an Administrator, add rights for Administrators to modify that directory and the parent directory and after that you should be able to remove it.

我不确定管理员是否可以直接删除目录,但应该可以添加权限.

I am not certain if it is possible for an administrator to remove the directory directly, but it should be possible for one to add the rights to do so.

更新:我刚刚安装了 PostgreSQL 并在 Vista 中对其进行了测试,它可能在 Windows 7 中也能正常工作.看起来他们已经修复了权限问题,所以上面的提示不起作用(更改权限).

Update: I just installed PostgreSQL and tested it in Vista, it might work the same in Windows 7. It seems like they have fixed the permission stuff, so the tip above doesn't work (changing the permissions).

但是,如果系统帐户还在,您可以在计算机管理中访问它.将其添加到常规用户组(如用户或管理员),然后您应该可以使用它登录,然后删除目录.

However, if the system account is still there, you can access it in the Computer Management. Add it to a regular user group (like Users or Administrators) and then you should be able to login with it and after that remove the directory.

这篇关于在win7中删除旧的PostgreSQL数据目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆