拾贝博客

——积累知识,胜于积累金银

Windows11 postgresql13升级到14

作者:晨檬 向 | 发表于  2022年5月26日 (1513)

pg_upgrade升级方式

官方提供的简略方法在windows11上存在一些问题

pg_upgrade  --old-datadir "D:/PostgreSQL/13/data"  --new-datadir "D:/PostgreSQL/14/data"  --old-bindir "C:/Program Files/PostgreSQL/13/bin"  --new-bindir "C:/Program Files/PostgreSQL/14/bin"  --old-options "-c config_file=D:/PostgreSQL/13/data/postgresql.conf" --new-options "-c config_file=D:/PostgreSQL/14/data/postgresql.conf" -U postgres -p 5432 -P 5433  

注意:
- 必须指明端口,默认的50432,win11上报错
- 必须指明新数据库的登录用户名“postgres”
- pg_upgrade 不支持密码参数,需要在配置文件种设置本机免密
- 如果安装了扩展,版本不一致,必须在老库中清除对应扩展


 

分类:技术分享

标签: OS Postgresql 数据库

分享:

 我来说两句

评论列表

相关文章