postgres 流复制集群--主备状态检查(二)
2023-09-27 14:25:36 时间
一,主备查看与使用
01,pg_controldata
--主机信息 [postgres@kafka01 pgdata]$ pg_controldata -D /data/pgdata/ pg_control version number: 1002 Catalog version number: 201707211 Database system identifier: 6818043668731457858 Database cluster state: in production --主要鉴别参数 pg_control last modified: Tue 09 Jun 2020 10:47:43 AM CST Latest checkpoint location: 2/90161F0 Prior checkpoint location: 2/9000028 Latest checkpoint's REDO location: 2/90161B8 Latest checkpoint's REDO WAL file: 000000030000000200000009 Latest checkpoint's TimeLineID: 3 Latest checkpoint's PrevTimeLineID: 3 Latest checkpoint's full_page_writes: on Latest checkpoint's NextXID: 0:2026 Latest checkpoint's NextOID: 33184 Latest checkpoint's NextMultiXactId: 1 Latest checkpoint's NextMultiOffset: 0 Latest checkpoint's oldestXID: 548 Latest checkpoint's oldestXID's DB: 1 Latest checkpoint's oldestActiveXID: 2026 Latest checkpoint's oldestMultiXid: 1 Latest checkpoint's oldestMulti's DB: 1 Latest checkpoint's oldestCommitTsXid:0 Latest checkpoint's newestCommitTsXid:0 Time of latest checkpoint: Tue 09 Jun 2020 10:47:41 AM CST Fake LSN counter for unlogged rels: 0/1 Minimum recovery ending location: 0/0 Min recovery ending loc's timeline: 0 Backup start location: 0/0 Backup end location: 0/0 End-of-backup record required: no wal_level setting: replica wal_log_hints setting: on max_connections setting: 100 max_worker_processes setting: 8 max_prepared_xacts setting: 0 max_locks_per_xact setting: 64 track_commit_timestamp setting: off Maximum data alignment: 8 Database block size: 8192 Blocks per segment of large relation: 131072 WAL block size: 8192 Bytes per WAL segment: 16777216 Maximum length of identifiers: 64 Maximum columns in an index: 32 Maximum size of a TOAST chunk: 1996 Size of a large-object chunk: 2048 Date/time type storage: 64-bit integers Float4 argument passing: by value Float8 argument passing: by value Data page checksum version: 0 Mock authentication nonce: 0caad19ad346b9cd934c9fcef61f0b12bb9475a10f209d63a2997cebadceb8af
--备库参数信息 [postgres@pg_standby psql]$ pg_controldata -D /data/pgdata/ pg_control version number: 1002 Catalog version number: 201707211 Database system identifier: 6818043668731457858 Database cluster state: in archive recovery pg_control last modified: Tue 09 Jun 2020 10:47:49 AM CST Latest checkpoint location: 2/90161F0 Prior checkpoint location: 2/8000108 Latest checkpoint's REDO location: 2/90161B8 Latest checkpoint's REDO WAL file: 000000030000000200000009 Latest checkpoint's TimeLineID: 3 Latest checkpoint's PrevTimeLineID: 3 Latest checkpoint's full_page_writes: on Latest checkpoint's NextXID: 0:2026 Latest checkpoint's NextOID: 33184 Latest checkpoint's NextMultiXactId: 1 Latest checkpoint's NextMultiOffset: 0 Latest checkpoint's oldestXID: 548 Latest checkpoint's oldestXID's DB: 1 Latest checkpoint's oldestActiveXID: 2026 Latest checkpoint's oldestMultiXid: 1 Latest checkpoint's oldestMulti's DB: 1 Latest checkpoint's oldestCommitTsXid:0 Latest checkpoint's newestCommitTsXid:0 Time of latest checkpoint: Tue 09 Jun 2020 10:47:41 AM CST Fake LSN counter for unlogged rels: 0/1 Minimum recovery ending location: 2/9016298 Min recovery ending loc's timeline: 3 Backup start location: 0/0 Backup end location: 0/0 End-of-backup record required: no wal_level setting: replica wal_log_hints setting: on max_connections setting: 100 max_worker_processes setting: 8 max_prepared_xacts setting: 0 max_locks_per_xact setting: 64 track_commit_timestamp setting: off Maximum data alignment: 8 Database block size: 8192 Blocks per segment of large relation: 131072 WAL block size: 8192 Bytes per WAL segment: 16777216 Maximum length of identifiers: 64 Maximum columns in an index: 32 Maximum size of a TOAST chunk: 1996 Size of a large-object chunk: 2048 Date/time type storage: 64-bit integers Float4 argument passing: by value Float8 argument passing: by value Data page checksum version: 0 Mock authentication nonce: 0caad19ad346b9cd934c9fcef61f0b12bb9475a10f209d63a2997cebadceb8af --!!! 主机的cluster state是in production,备机的cluster state是in archive recovery。
02,pg_stat_replication
kingledb=> select * from pg_stat_replication
03,进程信息
主库的:
备库的:
04,函数查看
相关文章
- HBase-集群状态信息
- CDH集群spark-shell执行过程分析
- 使用 KubeKey 快速安装 Kubernetes 集群
- MySQL集群节点宕机,数据库脑裂!如何排障?
- ES集群状态查看命令
- 你必须知道的 4 种 Redis 集群方案及优缺点对比
- elasticsearch集群健康状态查看
- RocketMQ集群搭建
- pg_resetxlog - 重置一个 PostgreSQL 数据库集群的预写日志以及其它控制内容
- 《高性能Linux服务器构建实战:系统安全、故障排查、自动化运维与集群架构》——第1章 Linux服务器安全运维 1.1 账户和登录安全
- 《高性能Linux服务器构建实战:系统安全、故障排查、自动化运维与集群架构》——1.4 系统软件安全管理
- 《高性能Linux服务器构建实战:系统安全、故障排查、自动化运维与集群架构》——1.7 一次Linux被入侵后的分析
- 生成整数自增ID(集群主键生成服务)
- 通过命令管理ceph集群
- (0.14)elasticsearch集群运维
- Keepalived+Nginx实现双机主备、双主热备高可用集群架构
- Linux服务器集群系统(三)--转
- Spark-----Spark 与 Hadoop 对比,Spark 集群搭建与示例运行,RDD算子简单入门