【PG】PostgreSQL高可用之repmgr命令手册

repmgr primary register - 初始化安装repmgr扩展并注册主节点

描述

repmgr primary register在流复制集群中注册主节点 ,并将其配置为与repmgr一起使用,包括安装repmgr扩展。此命令需要在注册任何备用节点之前执行

执行

执行该--dry-run选项来检查在没有实际注册主服务器的情况下会发生什么。
repmgr master register 与 repmgr primary register 作用相同

用户权限要求

用户repmgr必须是超级用户 ,repmgr 才能够安装该repmgr扩展。

如果不是这种情况,repmgr可以在执行之前手动安装该扩展repmgr primary register

未来的repmgr--superuser版本将能够 为扩展的安装 提供名称。

选项

--dry-run

检查先决条件但实际上并不注册主要项。

-F--force

覆盖现有节点记录

事件通知

将生成 以下事件通知:

  • cluster_created
  • primary_register

repmgr primary unregister --- 取消注册不活动的主节点

repmgr standby clone --- 从另一个 PostgreSQL 节点克隆一个 PostgreSQL 备用节点

--- 将备用信息添加到repmgr元数据中

-从repmgr 元数据中删除备用信息

--- 将备用数据库提升为主数据库

参考 rpmgr 官方手册

  1. repmgr primary register --- initialise a repmgr installation and register the primary node
  2. repmgr primary unregister --- unregister an inactive primary node
  3. repmgr standby clone --- clone a PostgreSQL standby node from another PostgreSQL node
  4. repmgr standby register --- add a standby's information to the repmgr metadata
  5. repmgr standby unregister --- remove a standby's information from the repmgr metadata
  6. repmgr standby promote --- promote a standby to a primary
  7. repmgr standby follow --- attach a running standby to a new upstream node
  8. repmgr standby switchover --- promote a standby to primary and demote the existing primary to a standby
  9. repmgr witness register --- add a witness node's information to the repmgr metadata
  10. repmgr witness unregister --- remove a witness node's information to the repmgr metadata
  11. repmgr node status --- show overview of a node's basic information and replication status
  12. repmgr node check --- performs some health checks on a node from a replication perspective
  13. repmgr node rejoin --- rejoin a dormant (stopped) node to the replication cluster
  14. repmgr node service --- show or execute the system service command to stop/start/restart/reload/promote a node
  15. repmgr cluster show --- display information about each registered node in the replication cluster
  16. repmgr cluster matrix --- runs repmgr cluster show on each node and summarizes output
  17. repmgr cluster crosscheck --- cross-checks connections between each combination of nodes
  18. repmgr cluster event --- output a formatted list of cluster events
  19. repmgr cluster cleanup --- purge monitoring history
  20. repmgr service status --- display information about the status of repmgrd on each node in the cluster
  21. repmgr service pause --- Instruct all repmgrd instances in the replication cluster to pause failover operations
  22. repmgr service unpause --- Instruct all repmgrd instances in the replication cluster to resume failover operations
  23. repmgr daemon start --- Start the repmgrd daemon on the local node
  24. repmgr daemon stop --- Stop the repmgrd daemon on the local node
相关推荐
A10169330712 小时前
QT数据库(三):QSqlQuery使用
数据库·qt·oracle
码云数智-大飞2 小时前
分布式锁的三种实现方案:Redis、ZooKeeper与数据库的深度对比与选型指南
数据库·redis·分布式
“抚琴”的人2 小时前
SqlSugar 文档
开发语言·数据库·c#·sqlsugar
a***71632 小时前
IDEA连接SQL server数据库(保姆级详细且必坑,包括防火墙、 SQL Server 网络配置等问题解决)
网络·数据库·intellij-idea
木易 士心2 小时前
告别手写SQL?Cursor智能生成实战指南与避坑技巧
数据库·sql·ai编程
倔强的石头1062 小时前
KWDB 硬核实战:30ms 写入千条轨迹,用 SQL 打造物流车队“天眼”系统
数据库·sql·kwdb
啊哈哈121382 小时前
计算机三级备考(七)——高级数据库查询
服务器·数据库
亚历克斯神2 小时前
Flutter for OpenHarmony: Flutter 三方库 mongo_dart 助力鸿蒙应用直连 NoSQL 数据库构建高效的数据流转系统(纯 Dart 驱动方案)
android·数据库·flutter·华为·nosql·harmonyos
加农炮手Jinx2 小时前
Flutter for OpenHarmony:postgres 直连 PostgreSQL 数据库,实现 Dart 原生的高效读写(数据库驱动) 深度解析与鸿蒙适配指南
网络·数据库·flutter·华为·postgresql·harmonyos·鸿蒙
全栈小52 小时前
【数据库】Sql Server 安装教程,一键到底,沉浸式下载安装MSSQL和SSMS
数据库·sqlserver