12 2023 档案

摘要:postgresql 14 主备切换,原主加入集群中 阅读全文
posted @ 2023-12-29 14:48 jiaxzeng 阅读(796) 评论(1) 推荐(0) 编辑
摘要:1 主库操作 1.1 创建用于数据流的用户 主库操作 $ psql -h 127.0.0.1 -p 5432 -U postgres -W Password: psql (14.10) Type "help" for help. postgres=# create role repl login r 阅读全文
posted @ 2023-12-29 11:45 jiaxzeng 阅读(1382) 评论(0) 推荐(1) 编辑
摘要:背景说明 三个 keepalived 服务组成一个高可用环境。风和日丽的下午突然通知某个生产环境 vip 不通,使用承载 vip 的主机测试服务是正常。进而推断 keepalived 导致的问题。。。 三个主机IP地址分别是:x.x.3.17 、 x.x.3.18、x.x.3.19。 VIP地址是: 阅读全文
posted @ 2023-12-28 14:53 jiaxzeng 阅读(173) 评论(0) 推荐(0) 编辑
摘要:触发 Archiving 条件: 单个WAL文件满 (max_wal_size) WAL文件组可用容量不足 (min_wal_size) checkpoint 操作 手工checkpoint,连接pg服务执行 checkpoint 自动checkpoint (checkpoint_timeout 参 阅读全文
posted @ 2023-12-26 11:28 jiaxzeng 阅读(81) 评论(0) 推荐(0) 编辑
摘要:内核参数 cat <<'EOF' | sudo tee /etc/sysctl.d/postgresql.conf >> /dev/null # 表示内核所允许的最大共享内存段的大小。推荐设置物理内存的一半 kernel.shmmax = 4294967296 # 共享内存的个数。推荐值:物理内存 阅读全文
posted @ 2023-12-25 15:43 jiaxzeng 阅读(234) 评论(0) 推荐(0) 编辑
摘要:确认环境 egrep -c '(vmx|svm)' /proc/cpuinfo 输出结果需要大于0,否则主机需要开启cpu虚拟化功能。 内核参数 这个三个参数 =1 时,虚机桥接网卡DHCP获取不到IP地址 cat <<'EOF' | sudo tee /etc/sysctl.d/bridge.co 阅读全文
posted @ 2023-12-22 14:32 jiaxzeng 阅读(273) 评论(0) 推荐(0) 编辑
摘要:kvm宿主机要包含以下内核参数 cat <<'EOF' | sudo tee /etc/sysctl.d/bridge.conf > /dev/null net.bridge.bridge-nf-call-arptables = 0 net.bridge.bridge-nf-call-ip6tabl 阅读全文
posted @ 2023-12-20 16:26 jiaxzeng 阅读(43) 评论(0) 推荐(0) 编辑
摘要:需求说明 CentOS7 关机之前自动执行脚本 解决方法 创建 shutdown-clean 服务 cat <<'EOF' | sudo tee /usr/lib/systemd/system/shutdown-clean.service > /dev/null [Unit] Description 阅读全文
posted @ 2023-12-18 17:38 jiaxzeng 阅读(75) 评论(0) 推荐(0) 编辑
摘要:curl、wget、yum、docker和containerd 等服务做网络代理 阅读全文
posted @ 2023-12-08 15:10 jiaxzeng 阅读(25) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示