摘要: 1. 查看主库的参数设置: SQL> show parameter log_archive_dest_2 NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ log_archi... 阅读全文
posted @ 2019-10-13 16:22 刚好遇见Mysql 阅读(576) 评论(0) 推荐(0)
摘要: 查看文件 导出数据 阅读全文
posted @ 2019-10-12 17:33 刚好遇见Mysql 阅读(645) 评论(0) 推荐(0)
摘要: postgres=# select * from pg_tables where tablename='t'; schemaname | tablename | tableowner | tablespace | hasindexes | hasrules | hastriggers | rowse 阅读全文
posted @ 2019-10-12 14:05 刚好遇见Mysql 阅读(2239) 评论(0) 推荐(0)
摘要: pg_switch_xlog() 是9.6版本下的命令,强制手动切换归档日志 postgres=# select version(); version PostgreSQL 11.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 201203 阅读全文
posted @ 2019-10-12 11:35 刚好遇见Mysql 阅读(1543) 评论(0) 推荐(0)
摘要: 逻辑备份 postgres=# select * from t; id | name + 1 | http 2 | qdds (2 rows) postgres=# \l List of databases Name | Owner | Encoding | Collate | Ctype | Ac 阅读全文
posted @ 2019-10-11 18:27 刚好遇见Mysql 阅读(925) 评论(0) 推荐(0)
摘要: 修改postgresql.conf archive_mode =on%p = path of file to archive%f = file name only archive_command ='cp %p /u01/pgsql/archive/pg_%f' 重启postgresql pg_ct 阅读全文
posted @ 2019-09-22 19:01 刚好遇见Mysql 阅读(3894) 评论(0) 推荐(0)
摘要: postgresql11 有2种安装方法:二进制源码安装 、rpm包安装 不过在上述2中安装方式前都要先建用户和组及目录编辑用户环境变量 严格起来还需要设置sysctl.conf and limits.conf rpm安装完毕以后需要从/usr/local/pgsql-11下的东西拷贝到/u01/p 阅读全文
posted @ 2019-09-22 17:04 刚好遇见Mysql 阅读(5270) 评论(0) 推荐(0)
摘要: 每隔1秒ping3次 [redis@redis01 ~]$ redis-cli -h 192.168.20.201 -p 7003 -i 1 -r 3 ping PONG PONG PONG 模拟复制进程 [redis@redis01 7001]$ redis-cli -h 192.168.20.201 -p 7002 --slave SYNC with master, discarding 17 阅读全文
posted @ 2019-09-17 18:09 刚好遇见Mysql 阅读(217) 评论(0) 推荐(0)
摘要: redis cluster和小哨兵组合 高可用方案是一种全自动的办法 cluster 主要编辑3个参数 启动server 创建cluster,redis5.0开始不再使用ruby搭建集群 查看cluster信息 添加从节点 查看nodes 添加master 删除节点 和 删除复制节点命令是一样的 检 阅读全文
posted @ 2019-09-16 21:47 刚好遇见Mysql 阅读(326) 评论(0) 推荐(0)
摘要: 用主从复制的情况下,Master服务器进行了down机的情况,我们的系统就不能再进行写的操作,所以此时redis在2.6版本引入了哨兵模式,但是并不稳定,2.8版本之后哨兵模式才稳定了起来。顾名思义Redis的哨兵模式就是对redis系统进行实时的监控,其主要功能有下面两点1.监测主数据库和从数据库 阅读全文
posted @ 2019-09-16 18:45 刚好遇见Mysql 阅读(414) 评论(0) 推荐(0)