AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / dba / 问题

问题[repmgr](dba)

Martin Hope
lbrz
Asked: 2021-02-11 08:12:03 +0800 CST

在 repmgr 集群状态输出中,repmgr 符号“*”是什么意思?

  • 1

我是 postgres 管理的新手,想知道repmgr cluster show命令输出中的“*”符号是什么意思。

 ID | Name    | Role    | Status    | Upstream | Location | Connection string                                               
----+---------+---------+-----------+----------+----------+------------------------------------------------------------------
 1  | node-1  | standby |   running | node-2   | default  | host= [...] 
 2  | node-2  | primary | * running |          | default  | host= [...]
 3  | node-3  | witness | * running | node-2   | default  | host= [...]

我在文档中没有找到任何关于它的信息(https://repmgr.org/docs/4.0/repmgr-cluster-show.html)

使用repmgr cluster show --csv文档中提到的,我可以看到 ID 为 1 的节点处于恢复状态“恢复中”。有关系吗?

postgresql 版本:10.5 repmgr 版本:4.0

postgresql repmgr
  • 1 个回答
  • 126 Views
Martin Hope
rawmain
Asked: 2020-09-22 17:51:37 +0800 CST

如何在 PostgreSQL 10 中使用 repmgr?

  • 0

按照官方repmgr文档,我将这些项目设置到配置文件中:

  shared_preload_libraries = 'repmgr'
  max_wal_senders = 10
  max_replication_slots = 10
  wal_level = 'hot_standby'
  hot_standby = on
  archive_mode = on

但是,在/var/lib/pgsql/10/data/postgresql.conf文件中,默认为

#wal_level = replica                    # minimal, replica, or logical
                                        # (change requires restart)

没有hot_standby选项。

如果我使用配置作为repmgr 文件,当我想创建数据库或用户时,总是挂起。

createuser -s myuser
createdb -E UNICODE -l en_US.UTF-8 -T template0 mydb -O myuser

但是使用默认的 postgresql 配置会很好用。

那么如何repmgr正确使用 PostgreSQL 10 呢?

postgresql repmgr
  • 1 个回答
  • 58 Views
Martin Hope
Rogerlr
Asked: 2018-04-25 08:45:08 +0800 CST

Postgres repmgr - 未附加下游节点

  • 0

我在 node1 和 node3 上配置了 repmgr 复制(分别是主节点和备用节点),并且设置成功地在备用节点上创建了新的记录和对象。但几周后,我注意到复制不再起作用,但是一些 repmgr 命令在复制工作时返回结果。我尝试重新启动并再次注册备用节点,但它不起作用。

我怎样才能继续复制?

节点状态如下:

-bash-4.2$ psql -V
psql (PostgreSQL) 10.3

节点 1 - 主要

-bash-4.2$ repmgr node check
Node "node1":
    Server role: OK (node is primary)
    Replication lag: OK (N/A - node is primary)
    WAL archiving: OK (0 pending archive ready files)
    Downstream servers: OK (this node has no downstream nodes)
    Replication slots: OK (node has no replication slots)
-bash-4.2$

节点 3 - 待机

-bash-4.2$ repmgr -f /etc/repmgr/10/repmgr.conf node check 
Node "node3":
    Server role: OK (node is standby)
    Replication lag: OK (0 seconds)
    WAL archiving: OK (0 pending archive ready files)
    Downstream servers: CRITICAL (1 of 1 downstream nodes not attached; missing: node3 (ID: 3))
    Replication slots: OK (node has no replication slots)

-bash-4.2$ repmgr node status 
Node "node3":
    PostgreSQL version: 10.3
    Total data size: 2393 MB
    Conninfo: host=node3 user=repmgr dbname=repmgr connect_timeout=2
    Role: standby
    WAL archiving: disabled (on standbys "archive_mode" must be set to "always" to be effective)
    Archive command: /bin/true
    WALs pending archiving: 0 pending files
    Replication connections: 0 (of maximal 10)
    Replication slots: 0 (of maximal 10)
    Upstream node: node3 (ID: 3)
    Replication lag: 0 seconds
    Last received LSN: 4/AC000000
    Last replayed LSN: 4/AC000140
postgresql repmgr
  • 2 个回答
  • 4430 Views
Martin Hope
adamo
Asked: 2014-09-06 22:37:05 +0800 CST

repmgr:我可以将数据库从两个不同的主服务器复制到第三个从服务器吗?

  • 0

如果我有一个主节点 1(带有数据库 A)和一个主节点 2(带有数据库 B),我可以使用 repmgr 并将 A 和 B 都复制到热备用节点 3 吗?

[ 编辑:他们都将运行 Postgres 9.3 ]

postgresql repmgr
  • 1 个回答
  • 911 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目

    • 12 个回答
  • Marko Smith

    如何让sqlplus的输出出现在一行中?

    • 3 个回答
  • Marko Smith

    选择具有最大日期或最晚日期的日期

    • 3 个回答
  • Marko Smith

    如何列出 PostgreSQL 中的所有模式?

    • 4 个回答
  • Marko Smith

    列出指定表的所有列

    • 5 个回答
  • Marko Smith

    如何在不修改我自己的 tnsnames.ora 的情况下使用 sqlplus 连接到位于另一台主机上的 Oracle 数据库

    • 4 个回答
  • Marko Smith

    你如何mysqldump特定的表?

    • 4 个回答
  • Marko Smith

    使用 psql 列出数据库权限

    • 10 个回答
  • Marko Smith

    如何从 PostgreSQL 中的选择查询中将值插入表中?

    • 4 个回答
  • Marko Smith

    如何使用 psql 列出所有数据库和表?

    • 7 个回答
  • Martin Hope
    Jin 连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目 2014-12-02 02:54:58 +0800 CST
  • Martin Hope
    Stéphane 如何列出 PostgreSQL 中的所有模式? 2013-04-16 11:19:16 +0800 CST
  • Martin Hope
    Mike Walsh 为什么事务日志不断增长或空间不足? 2012-12-05 18:11:22 +0800 CST
  • Martin Hope
    Stephane Rolland 列出指定表的所有列 2012-08-14 04:44:44 +0800 CST
  • Martin Hope
    haxney MySQL 能否合理地对数十亿行执行查询? 2012-07-03 11:36:13 +0800 CST
  • Martin Hope
    qazwsx 如何监控大型 .sql 文件的导入进度? 2012-05-03 08:54:41 +0800 CST
  • Martin Hope
    markdorison 你如何mysqldump特定的表? 2011-12-17 12:39:37 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 对 SQL 查询进行计时? 2011-06-04 02:22:54 +0800 CST
  • Martin Hope
    Jonas 如何从 PostgreSQL 中的选择查询中将值插入表中? 2011-05-28 00:33:05 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 列出所有数据库和表? 2011-02-18 00:45:49 +0800 CST

热门标签

sql-server mysql postgresql sql-server-2014 sql-server-2016 oracle sql-server-2008 database-design query-performance sql-server-2017

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve