postgresql 12更改数据库目录(Windows)

in 技巧百宝箱 with 0 comment

1.停止postgresql服务

2.打开注册表更改默认数据库路径在D-后面替换新的数据库路径。

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservicespostgresql-x64-9.5

ImagePath中修改数据库路径。

3.复制原来的数据库到新路径

4.重启服务

迁移后出现服务无法启动:修改新目录的读写权限。(迁移到C盘比较容易出现此问题。)

参考链接:

  1. postgresql 在window下更改数据库目录
  2. windows2008 server 上迁移postgresql 的data目录
The article has been posted for too long and comments have been automatically closed.