pg_upgrade升级报错:Only the install user can be defined in the new cluster
前两天pg11刚出来,打算测试一下,想将测试库升级到pg11,之前测试库的版本是pg9.6,后面我将它升到了pg10,打算在pg10的版本基础上升级到pg11。
但执行时,多次报出:
Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database user is the install user ok
Checking database connection settings ok
Checking for prepared transactions ok
Checking for reg* data types in user tables ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking for presence of required libraries ok
Checking database user is the install user Only the install user can be defined in the new cluster.
所以就搜了一下代码,在src/bin/pg_upgrade/check.c中找到该报错的原因
/*
* We only allow the install user in the new cluster because other defined
* users might match users defined in the old cluster and generate an
* error during pg_dump restore.
*/
if (cluster == &new_cluster && atooid(PQgetvalue(res, , )) != )
pg_fatal("Only the install user can be defined in the new cluster.\n");
pg_upgrade升级时,只允许使用安装新集群时所用的用户,这是因为在旧集群中存在的用户在执行pg_dump和restore时,可能会报错。
后面又查了一下环境变量,发现环境变量中配置了一个测试库的用户,而不是postgres用户。怀疑无论是在做initdb还是pg_upgrade时,都不应该走环境变量的用户,而且在执行pg_upgrade时,已经明确指定了使用postgres,那么可能出在initdb上,但重新测试发现无论initdb时,指没指定是否是postgres用户,都是按照postgres来初始化的,它是跟着操作系统用户走的。后来又重试了几遍,发现执行检测没问题,但到了实际执行时,总会报Only the install user can be defined in the new cluster的错误,然后删掉生成pg11版本的表空间数据,删掉初始化的新集群,再重新初始化,然后执行pg_ugrade的检测和实际执行就又变正常了,至此感觉碰到了bug。反复操作了三四次都是同样的结果。
如有知道原因的请告知一下,谢谢。
另外,在安装pg11时,注意参数--wal-segsize放在了initdb部分,需要在做初始化时设置,在编译部分已经没有这个参数了。
pg_upgrade升级报错:Only the install user can be defined in the new cluster的更多相关文章
- [已解决]报错: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Users/mac/Ana
报错代码: pip3 install gerapy 报错内容: Could not install packages due to an EnvironmentError: [Errno 13] Pe ...
- VMware station 安装报错 failed to install the hcmon driver
VMware station 安装报错 failed to install the hcmon driver 1.将 C:\Windows\System32\drivers 下的hcmon.sys改名 ...
- pve apt-get update error 升级报错-文章未完工和验证
pve: apt-get update error 升级报错 提示如下报错 Hit: http://security.debian.org buster/updates InRelease Hit: ...
- 使用SpringMVC报错 Error creating bean with name 'conversionService' defined in class path resource [springmvc.xml]
使用SpringMVC报错 Error creating bean with name 'conversionService' defined in class path resource [spri ...
- electron-vue报错:Webpack ReferenceError: process is not defined
electron-vue报错:Webpack ReferenceError: process is not defined 博客说明 文章所涉及的资料来自互联网整理和个人总结,意在于个人学习和经验汇总 ...
- FreeSWITCH安装报错“You must install libyuv-dev to build mod_fsv”的解决方案
昨天下午安装FreeSWITCH时遇到该问题时,整了一个下午都没解决,也走了许多弯路.如果直接通过yum安装libyuv-devel时,会报错说找不到该安装包.后来又通过FreeSWITCH官网的网上 ...
- build.xml编译报错Specified VM install not found: type Standard VM, name jdk1.7.0_45
build.xml编译打包时报错: 解决方法: build.xml —— 右键 —— Run As —— External Tools Configuration 在这个页面的顶端就会看到有红叉 ...
- cordova AndroidStudio3.0 升级报错问题
http://blog.csdn.net/z_Xiaozuo/article/details/78962701 ionic3 打包 安卓项目遇到的问题,当时比较冲忙升级了下android studio ...
- PandaSeq安装报错ltld required, install libtool library
PandaSeq安装 $ ./autogen.sh && ./configure && make && sudo make install PandaS ...
随机推荐
- 如何在静态方法或非Spring Bean中注入Spring Bean
在项目中有时需要根据需要在自己new一个对象,或者在某些util方法或属性中获取Spring Bean对象,从而完成某些工作,但是由于自己new的对象和util方法并不是受Spring所 ...
- 分布式日志收集收集系统:Flume(转)
Flume是一个分布式.可靠.和高可用的海量日志采集.聚合和传输的系统.支持在系统中定制各类数据发送方,用于收集数据:同时,Flume提供对数据进行简单处理,并写到各种数据接受方(可定制)的能力.Fl ...
- fetch err : "Body not allowed for GET or HEAD requests"
在使用 fetch 的时候 报了 "Body not allowed for GET or HEAD requests" 这个错. 代码如下: 一番google , 找到答案了. ...
- Linux常用软件安装与配置——目录
http://blog.csdn.net/clevercode/article/details/45740431
- wordpress登录密码框明文显示最后一个输入的字符
wordpress登录密码框明文显示最后一个输入的字符 (function(a){a.fn.dPassword=function(c){var e={interval:200,duration:100 ...
- web 08 struts2入门 struts2配置 struts包
电影网站:www.aikan66.com 项目网站:www.aikan66.com游戏网站:www.aikan66.com图片网站:www.aikan66.com书籍网站:www.aikan66.co ...
- Good Time 冲刺 五
一.今日完成任务情况及遇到的问题 第五天 日期:2018.6.18 王怡镔:今天继续在学习中完善编写页面,对之前的页面进行部分改进. 于鑫宇:修改完善布局,复习. 胡雅馨:今天继续改进页面,努力解决时 ...
- Java集合技巧
集合的一些技巧: 需要唯一吗? 需要:Set 需要制定顺序: 需要: TreeSet 不需要:HashSet 但是想要一个和存储一致的顺序(有序):LinkedHashSet 不需要:List ...
- javascript 组件化(转载)
这边只是很简陋的实现了类的继承机制.如果对类的实现有兴趣可以参考我另一篇文章javascript oo实现 我们看下使用方法: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
- HDU 2123 An easy problem
http://acm.hdu.edu.cn/showproblem.php?pid=2123 Problem Description In this problem you need to make ...