PostgreSQL16在Windows下安装

1.官网下载安装包并安装

2.安装时遇到问题

Problem running post-install step. Installation may not complete correctlty.
The database cluster initialisation failed.

  • 解决方法:
    安装完成后管理员启动cmd,cd到pg的bin目录输入
D:\PostgreSQL\bin>initdb.exe -D D:\databases

3.开启服务

D:\PostgreSQL\bin>pg_ctl.exe register -N postgresql16 -D D:\databases

控制面板-搜索服务-管理服务-启动postgresql16服务

4.设置用户

createuser -s -r postgres 

5.navicat连接

提示:字段 datlastsysoid 不存在
因为pg版本太高
更新一下navicat的libcc.dll文件
使用https://hexed.it/打开
搜索SELECT DISTINCT datlastsysoid
修改为SELECT DISTINCT dattablespace

posted @ 2024-08-23 09:48  lwx_R  阅读(532)  评论(0)    收藏  举报