31.6. Monitoring

|              31.6. Monitoring               |                              |                               |                  |                                          |
|:-------------------------------------------:|------------------------------|-------------------------------|------------------|------------------------------------------|
|[Prev](logical-replication-architecture.html)|[Up](logical-replication.html)|Chapter 31. Logical Replication|[Home](index.html)| [Next](logical-replication-security.html)|

---

## 31.6. Monitoring

 Because logical replication is based on a similar architecture as [physical streaming replication](warm-standby.html#STREAMING-REPLICATION), the monitoring on a publication node is similar to monitoring of a physical replication primary (see [Section 27.2.5.2](warm-standby.html#STREAMING-REPLICATION-MONITORING)).

 The monitoring information about subscription is visible in [`pg_stat_subscription`](monitoring-stats.html#MONITORING-PG-STAT-SUBSCRIPTION). This view contains one row for every subscription worker. A subscription can have zero or more active subscription workers depending on its state.

 Normally, there is a single apply process running for an enabled subscription. A disabled subscription or a crashed subscription will have zero rows in this view. If the initial data synchronization of any table is in progress, there will be additional workers for the tables being synchronized.

---

|[Prev](logical-replication-architecture.html)|[Up](logical-replication.html)| [Next](logical-replication-security.html)|
|:--------------------------------------------|:----------------------------:|-----------------------------------------:|
|             31.5. Architecture              |      [Home](index.html)      |              31.7. Security              |

 // \<![CDATA[ \<-- For SVG support if ('WebSocket' in window) { (function() { function refreshCSS() { var sheets = [].slice.call(document.getElementsByTagName("link")); var head = document.getElementsByTagName("head")[0]; for (var i = 0; i \< sheets.length; ++i) { var elem = sheets[i]; head.removeChild(elem); var rel = elem.rel; if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") { var url = elem.href.replace(/(&|\\?)\_cacheOverride=\\d+/, ''); elem.href = url + (url.indexOf('?') \>= 0 ? '&' : '?') + '\_cacheOverride=' + (new Date().valueOf()); } head.appendChild(elem); } } var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://'; var address = protocol + window.location.host + window.location.pathname + '/ws'; var socket = new WebSocket(address); socket.onmessage = function(msg) { if (msg.data == 'reload') window.location.reload(); else if (msg.data == 'refreshcss') refreshCSS(); }; console.log('Live reload enabled.'); })(); } // ]]\>