数据库
康雨城
Talk is cheap, show me the code
展开
-
postgresql无法启动
pg_ctl: could not start serverpg_ctl: Examine the log output.systemd: postgresql.service: control process exited, code=exited status=1systemd: postgresql.service: control process exited, code=exited status=1systemd: Failed to start PostgreSQL datab...原创 2021-06-21 19:05:56 · 6171 阅读 · 0 评论 -
python实现一种检测postgresql数据库是否已经连接且为主节点的办法
select pg_is_in_recovery();语句是核心。通过执行这一条sql语句来判断,当前的数据库是否为主节点。同时,假如语句执行成功,则自然而然证明,该数据库已经可用。原创 2021-03-23 09:10:22 · 1215 阅读 · 0 评论 -
【pip install psycopg2安装报错】Error: pg_config executable not found.
yum install postgresql-dev 解决 Error: pg_config executable not found.pg_config is required to build psycopg2 from source. Please add the directory containing pg_config to the $PATH or specify the full executable path with the option原创 2020-11-21 21:51:22 · 7053 阅读 · 0 评论 -
【postgresql初始化失败】initdb: invalid locale settings; check LANG and LC_* environment variables
The files belonging to this database system will be owned by user "postgres".This user must also own the server process.initdb: invalid locale settings; check LANG and LC_* environment variables原创 2020-11-21 15:27:43 · 7481 阅读 · 0 评论 -
PostgreSQL(三)pgpool管理PostgreSQL集群下主机宕机后的主从切换
主节点PostgreSQL进程出现故障,而pgpool的服务未受影响。主从自动切换。原创 2020-09-19 17:35:34 · 2634 阅读 · 0 评论 -
PostgreSQL(二)PostgreSQL一主二从集群之上部署双节点pgpool-II
最底层是三个PostgreSQL Server,分别部署在三台机器上,采用“一主二从”的部署方法,即一台主节点、两台从节点。而pgpool-II Server是一个中间件。它向应用程序提供一个固定的虚拟IP地址,应用程序无需关心PostgreSQL Server后台。pgpool-II Server部署在其中两台机机器当中,pgpool-II Server之间通过“看门狗”服务保持信息互通,同时避免pgpool单点故障。原创 2020-09-19 02:03:58 · 3086 阅读 · 4 评论 -
PostgreSQL(一)PostgreSQL一主二从集群部署
postgresql一主二从搭建原创 2020-09-12 17:11:53 · 9279 阅读 · 3 评论
分享