Hi all,

The documentation does not explain at all what means "sync" or "async"
on pg_stat_replication. The paragraph "Planning for high availability"
mentions "catchup" and "streaming", but it does not say that users can
refer to it directly in pg_stat_replication.

Thoughts about the patch attached to add a couple of sentences in
"Planning for high availability"? We could as well mention it directly
in the page of pg_stat_replication but this information seems more
suited if located in the HA section.

diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index 5bedaf2..5ef6aa9 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -1235,6 +1235,8 @@ synchronous_standby_names = '2 (s1, s2, s3)'
     will increase according to the length of time the standby has been down.
     The standby is only able to become a synchronous standby
     once it has reached <literal>streaming</> state.
+    This is directly reported by the system view
+    <literal>pg_stat_replication</> with the field <literal>state</>.
@@ -1259,6 +1261,12 @@ synchronous_standby_names = '2 (s1, s2, s3)'
+    Asynchronous standbys are reported as <literal>async</> in the system
+    view <structname>pg_stat_replication</> with the field
+    <structfield>sync_state</>, and synchronous standbys as <literal>sync</>.
+   </para>
+   <para>
     If the primary is isolated from remaining standby servers you should
     fail over to the best candidate of those other remaining standby servers.
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to