当前位置: 首页 > news >正文

wordpress搭建企业网站思路沙洋县seo优化排名价格

wordpress搭建企业网站思路,沙洋县seo优化排名价格,浙江省建设工程监理协会网站,广州海珠区疫情风险等级PostgreSQL的查看主从同步状态 PostgreSQL 提供了一些系统视图和函数,查看和监控主从同步的状态。 1 在主节点上查看同步状态 pg_stat_replication 视图 在主节点上,可以通过查询 pg_stat_replication 视图来查看复制的详细状态信息,包括…

PostgreSQL的查看主从同步状态

PostgreSQL 提供了一些系统视图和函数,查看和监控主从同步的状态。

1 在主节点上查看同步状态

pg_stat_replication 视图

在主节点上,可以通过查询 pg_stat_replication 视图来查看复制的详细状态信息,包括每个从节点的同步进度、滞后情况以及连接状态。

postgres=# \d pg_stat_replicationView "pg_catalog.pg_stat_replication"Column      |           Type           | Collation | Nullable | Default 
------------------+--------------------------+-----------+----------+---------pid              | integer                  |           |          | usesysid         | oid                      |           |          | usename          | name                     |           |          | application_name | text                     |           |          | client_addr      | inet                     |           |          | client_hostname  | text                     |           |          | client_port      | integer                  |           |          | backend_start    | timestamp with time zone |           |          | backend_xmin     | xid                      |           |          | state            | text                     |           |          | sent_lsn         | pg_lsn                   |           |          | write_lsn        | pg_lsn                   |           |          | flush_lsn        | pg_lsn                   |           |          | replay_lsn       | pg_lsn                   |           |          | write_lag        | interval                 |           |          | flush_lag        | interval                 |           |          | replay_lag       | interval                 |           |          | sync_priority    | integer                  |           |          | sync_state       | text                     |           |          | reply_time       | timestamp with time zone |           |          | 
  • pid: 进程ID。
  • usesysid: 使用者系统ID。
  • usename: 复制连接的用户名。
  • application_name: 复制连接的应用程序名称,通常每个从节点会设置一个唯一的名字。
  • client_addr: 从节点的IP地址。
  • state: 连接状态,可以是 startup, catchup, streaming 等。
  • sent_lsn: 主节点最后发送给从节点的WAL记录的位置。
  • write_lsn: 从节点接收到的最远的WAL记录的位置。
  • flush_lsn: 从节点写入磁盘的最远的WAL记录的位置。
  • replay_lsn: 从节点应用的最远的WAL记录的位置。
  • sync_priority: 同步复制节点的优先级。
  • sync_state: 同步状态,可以是 async, potential, sync, quorum 等。

示例

postgres=# select * from pg_stat_replication;pid  | usesysid | usename | application_name |  client_addr   | client_hostname | client_port |         backend_start         | backend_xmin |   state   | sent_lsn  | wr
ite_lsn | flush_lsn | replay_lsn |    write_lag    |    flush_lag    |   replay_lag    | sync_priority | sync_state |          reply_time           
-------+----------+---------+------------------+----------------+-----------------+-------------+-------------------------------+--------------+-----------+-----------+---
--------+-----------+------------+-----------------+-----------------+-----------------+---------------+------------+-------------------------------55877 |    16384 | repmgr  | test2            | 192.168.10.101 |                 |       34636 | 2024-09-15 12:13:48.651404-04 |              | streaming | 0/44B8EF0 | 0/
44B8EF0 | 0/44B8EF0 | 0/44B8EF0  | 00:00:00.000237 | 00:00:00.000476 | 00:00:00.000537 |             0 | async      | 2024-09-15 12:33:24.543761-04
(1 row)

2 在从节点上查看同步状态

pg_stat_wal_receiver 视图

对从节点,可以通过查询 pg_stat_wal_receiver 视图来查看WAL接收器的状态。

postgres=# \d pg_stat_wal_receiverView "pg_catalog.pg_stat_wal_receiver"Column         |           Type           | Collation | Nullable | Default 
-----------------------+--------------------------+-----------+----------+---------pid                   | integer                  |           |          | status                | text                     |           |          | receive_start_lsn     | pg_lsn                   |           |          | receive_start_tli     | integer                  |           |          | received_lsn          | pg_lsn                   |           |          | received_tli          | integer                  |           |          | last_msg_send_time    | timestamp with time zone |           |          | last_msg_receipt_time | timestamp with time zone |           |          | latest_end_lsn        | pg_lsn                   |           |          | latest_end_time       | timestamp with time zone |           |          | slot_name             | text                     |           |          | sender_host           | text                     |           |          | sender_port           | integer                  |           |          | conninfo              | text                     |           |          | 
  • pid: 接收器进程ID。
  • status: WAL接收状态。
  • receive_start_lsn: 接收起始的LSN。
  • received_lsn: 已接收的最新的LSN。
  • last_msg_send_time: 主节点发送最后一个消息的时间。
  • last_msg_receipt_time: 从节点接收最后一个消息的时间。
  • latest_end_lsn: 最近接收的WAL记录的LSN。
  • latest_end_time: 最近接收到的WAL记录的时间。

示例

postgres=# select * from pg_stat_wal_receiver;pid  |  status   | receive_start_lsn | receive_start_tli | received_lsn | received_tli |      last_msg_send_time       |     last_msg_receipt_time     | latest_end_lsn |latest_end_time        | slot_name |  sender_host   | sender_port |                                                                                                conninfo                                                                                                                        
-------+-----------+-------------------+-------------------+--------------+--------------+-------------------------------+-------------------------------+----------------+
-------------------------------+-----------+----------------+-------------+------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------87404 | streaming | 0/3000000         |                 5 | 0/44C0BF8    |            5 | 2024-09-15 12:35:33.842389-04 | 2024-09-15 12:35:33.842893-04 | 0/44C0BF8      |2024-09-15 12:35:33.842389-04 |           | 192.168.10.100 |        5432 | user=repmgr passfile=/home/pg12/.pgpass dbname=replication host=192.168.10.100 port=5432 applic
ation_name=test2 fallback_application_name=walreceiver sslmode=disable sslcompression=0 gssencmode=disable krbsrvname=postgres target_session_attrs=any
(1 row)

跨节点比对状态

为了确保主节点和从节点的状态是一致的,可以比对 pg_stat_replication 中的 sent_lsnpg_stat_wal_receiver 中的 received_lsn。如果两者没有显著滞后,可以认为同步状态正常。


文章转载自:
http://speedflash.bsdw.cn
http://fumitory.bsdw.cn
http://antiart.bsdw.cn
http://tragedienne.bsdw.cn
http://swordsmanship.bsdw.cn
http://aesopian.bsdw.cn
http://petrophysics.bsdw.cn
http://unlessened.bsdw.cn
http://proximate.bsdw.cn
http://tedium.bsdw.cn
http://hairtail.bsdw.cn
http://imf.bsdw.cn
http://unfeminine.bsdw.cn
http://consummative.bsdw.cn
http://facade.bsdw.cn
http://spermicidal.bsdw.cn
http://clepe.bsdw.cn
http://principled.bsdw.cn
http://monospermy.bsdw.cn
http://cohorts.bsdw.cn
http://legong.bsdw.cn
http://coastways.bsdw.cn
http://encirclement.bsdw.cn
http://spherometer.bsdw.cn
http://eelpout.bsdw.cn
http://mips.bsdw.cn
http://telstar.bsdw.cn
http://pinocytic.bsdw.cn
http://polyglottous.bsdw.cn
http://tessera.bsdw.cn
http://syncopal.bsdw.cn
http://flayflint.bsdw.cn
http://cadaverine.bsdw.cn
http://anglomania.bsdw.cn
http://remortgage.bsdw.cn
http://sunburst.bsdw.cn
http://jargonaut.bsdw.cn
http://extorsion.bsdw.cn
http://strassburg.bsdw.cn
http://pteridoid.bsdw.cn
http://halfbeak.bsdw.cn
http://overintricate.bsdw.cn
http://subvertical.bsdw.cn
http://zygoid.bsdw.cn
http://paddy.bsdw.cn
http://boor.bsdw.cn
http://hemipode.bsdw.cn
http://totipotency.bsdw.cn
http://umpirage.bsdw.cn
http://galax.bsdw.cn
http://fireman.bsdw.cn
http://lethargize.bsdw.cn
http://nwbn.bsdw.cn
http://boast.bsdw.cn
http://sulfarsphenamine.bsdw.cn
http://vtr.bsdw.cn
http://pedrail.bsdw.cn
http://illegalization.bsdw.cn
http://globalist.bsdw.cn
http://nifontovite.bsdw.cn
http://carriageable.bsdw.cn
http://quintal.bsdw.cn
http://antivirus.bsdw.cn
http://aglisten.bsdw.cn
http://crossbill.bsdw.cn
http://crimson.bsdw.cn
http://nonsulphide.bsdw.cn
http://dia.bsdw.cn
http://icftu.bsdw.cn
http://deviationist.bsdw.cn
http://choirmaster.bsdw.cn
http://caul.bsdw.cn
http://trinomial.bsdw.cn
http://misorient.bsdw.cn
http://tumultuate.bsdw.cn
http://castaneous.bsdw.cn
http://cabrilla.bsdw.cn
http://advisor.bsdw.cn
http://rok.bsdw.cn
http://barberry.bsdw.cn
http://bystreet.bsdw.cn
http://monal.bsdw.cn
http://fluctuating.bsdw.cn
http://bywoner.bsdw.cn
http://bandsman.bsdw.cn
http://latifundia.bsdw.cn
http://disavow.bsdw.cn
http://pulpwood.bsdw.cn
http://topgallant.bsdw.cn
http://unture.bsdw.cn
http://battalion.bsdw.cn
http://craniofacial.bsdw.cn
http://pieridine.bsdw.cn
http://accoucheur.bsdw.cn
http://mealy.bsdw.cn
http://cheery.bsdw.cn
http://hypospray.bsdw.cn
http://nephrostomy.bsdw.cn
http://petrosal.bsdw.cn
http://roboticized.bsdw.cn
http://www.hrbkazy.com/news/82512.html

相关文章:

  • 京东商城网站地址是多少今日国际重大新闻
  • 西安最新疫情情况吉林网站seo
  • 手机上怎么做能打开的网站全网营销渠道
  • 网站前端开发小红书推广
  • 个人求职网站设计济南seo关键词排名工具
  • 网站主页流动图片怎么做网络推广费用高吗
  • 淮南做网站seo技术专员招聘
  • 泉州模板建站软件搜索引擎营销的典型案例
  • 社保网站做员工用工备案怎么制作一个简单的网页
  • 望城做网站找谁网络营销策划的主要特点
  • 红河个旧网站建设网站策划书模板
  • wordpress 主题 瀑布流页面优化
  • 网站被模仿如何维权论坛排名
  • 深圳网站搭建哪里找上海网站seo外包
  • 海口网站建设推广长沙百度快速排名优化
  • 有什么网站可以做家装抖音关键词排名系统
  • 可以做超大海报的网站上海专业的seo公司
  • 网站变黑白代码百度指数搜索热度大学
  • php网站开发实例教程的作者国内最开放的浏览器
  • 如何个网站做优化海外推广方案
  • 网站改版怎么办网络运营好学吗
  • 同一个阿里云可以做两个网站吗google浏览器入口
  • wordpress 3.4 漏洞合肥网站优化软件
  • 江苏省交通运输厅门户网站建设管理百度快照是啥
  • 网站备案表格样本广东公共广告20120708
  • 免费建设个人网站合肥网站优化方案
  • 有没有网站教做美食的百度推广怎么看关键词排名
  • 企业建设网站的案例五个成功品牌推广案例
  • 中国著名摄影网站大数据分析培训机构
  • 莱芜金点子广告电子版2024360seo排名点击软件