# PostgreSQL HA with Patroni always showing streaming

**URL:** <https://forums.percona.com/t/postgresql-ha-with-patroni-always-showing-streaming/24669>\
**Category:** Uncategorized\
**Created:** [August 25, 2023, 3:55am UTC](https://forums.percona.com/t/postgresql-ha-with-patroni-always-showing-streaming/24669 "2023-08-25T03:55:51Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![km5.santanu](https://avatars.discourse-cdn.com/v4/letter/k/8edcca/32.png) [@km5.santanu](https://forums.percona.com/u/km5.santanu)\
**Post date:** [August 25, 2023, 3:55am UTC](https://forums.percona.com/t/postgresql-ha-with-patroni-always-showing-streaming/24669/1 "2023-08-25T03:55:51Z")

</div>

hello  
we did the setup as per the document but we are not getting running status of other 2 node.  
Why is patronictl state showing " streaming "?  
is This status is normal " running ". or setup has any issue

Cluster: pg\_cluster --------±--------±----------±—±----------+  
| Member | Host | Role | State | TL | Lag in MB |  
±---------------±-----------±--------±----------±—±----------+  
| ossr005pgsql01 | x.x.x.5 | Replica | streaming | 2 | 0 |  
| ossr006pgsql02 | x.x.x.6 | Leader | running | 2 | |  
| ossr007pgsql03 | x.x.x.7 | Replica | streaming | 2 | 0 |  
±---------------±-----------±--------±----------±—±----------+

---

<div class="post-metadata">

**Author:** ![km5.santanu](https://avatars.discourse-cdn.com/v4/letter/k/8edcca/32.png) [@km5.santanu](https://forums.percona.com/u/km5.santanu)\
**Post date:** [August 27, 2023, 5:11am UTC](https://forums.percona.com/t/postgresql-ha-with-patroni-always-showing-streaming/24669/2 "2023-08-27T05:11:17Z")

</div>

any answer on it?  
is it bug?

---

<div class="post-metadata">

**Author:** ![Robert\_Bernier](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/robert_bernier/32/1367_2.png) [@Robert\_Bernier](https://forums.percona.com/u/Robert_Bernier)\
**Post date:** [August 29, 2023, 12:55pm UTC](https://forums.percona.com/t/postgresql-ha-with-patroni-always-showing-streaming/24669/3 "2023-08-29T12:55:11Z")

</div>

Hi,

This is what you should normally see.

```auto
patronictl -c /etc/patroni/patroni.yml list
+ Cluster: 12-main (6880906500246265532) ---------+----+-----------+
| Member | Host | Role | State | TL | Lag in MB |
+----------------+-------------+--------+---------+----+-----------+
| CSGB-F1T-PAT01 | 10.10.0.241 | | running | 6 | 0 |
| CSGB-F1T-PAT02 | 10.10.0.242 | | running | 6 | 0 |
| CSGB-F1T-PAT03 | 10.10.0.243 | Leader | running | 6 | |
+----------------+-------------+--------+---------+----+-----------+

```

If you still get the same readings as you have indicated in your post:

- login to the leader
  - check pg\_stat\_replication etc
  - check both postgres and patroni logs

- login REPLICA and check the postgres logs

Hope this helps.

---

<div class="post-metadata">

**Author:** ![km5.santanu](https://avatars.discourse-cdn.com/v4/letter/k/8edcca/32.png) [@km5.santanu](https://forums.percona.com/u/km5.santanu)\
**Post date:** [August 30, 2023, 2:26am UTC](https://forums.percona.com/t/postgresql-ha-with-patroni-always-showing-streaming/24669/4 "2023-08-30T02:26:35Z")

</div>

hello  
i checked there is no error.  
i am able to login and query the database on both of the database.  
not sure what is the impact of the status streaming.

---

<div class="post-metadata">

**Author:** ![Robert\_Bernier](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/robert_bernier/32/1367_2.png) [@Robert\_Bernier](https://forums.percona.com/u/Robert_Bernier)\
**Post date:** [August 30, 2023, 2:08pm UTC](https://forums.percona.com/t/postgresql-ha-with-patroni-always-showing-streaming/24669/5 "2023-08-30T14:08:29Z")

</div>

Hi

Apologies but what I meant to ask in my last post is that it would be helpful to see the output on those metrics.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![km5.santanu](https://avatars.discourse-cdn.com/v4/letter/k/8edcca/32.png) [@km5.santanu](https://forums.percona.com/u/km5.santanu)\
**Post date:** [August 31, 2023, 2:39pm UTC](https://forums.percona.com/t/postgresql-ha-with-patroni-always-showing-streaming/24669/6 "2023-08-31T14:39:15Z")

</div>

Hello below is my output  
patronictl -c /etc/patroni/patroni.yml list

[root@r005 ~]# patronictl -c /etc/patroni/patroni.yml list

- Cluster: pg\_cluster --------±--------±----------±—±----------+  
| Member | Host | Role | State | TL | Lag in MB |  
±---------------±-----------±--------±----------±—±----------+  
| abcd005pgsql01 | xx.xx.xx.5 | Leader | running | 16 | |  
| abcd006pgsql02 | xx.xx.xx.6 | Replica | streaming | 16 | 0 |  
| abcd007pgsql03 | xx.xx.xx.7 | Replica | streaming | 16 | 0 |  
±---------------±-----------±--------±----------±—±----------+

---

<div class="post-metadata">

**Author:** ![Robert\_Bernier](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/robert_bernier/32/1367_2.png) [@Robert\_Bernier](https://forums.percona.com/u/Robert_Bernier)\
**Post date:** [September 1, 2023, 4:38pm UTC](https://forums.percona.com/t/postgresql-ha-with-patroni-always-showing-streaming/24669/7 "2023-09-01T16:38:19Z")

</div>

Hi,  
What I meant to suggest is that you need all the other metrics that I mentioned in order to better diagnose your issues.

---

<div class="post-metadata">

**Author:** ![km5.santanu](https://avatars.discourse-cdn.com/v4/letter/k/8edcca/32.png) [@km5.santanu](https://forums.percona.com/u/km5.santanu)\
**Post date:** [September 6, 2023, 10:57am UTC](https://forums.percona.com/t/postgresql-ha-with-patroni-always-showing-streaming/24669/8 "2023-09-06T10:57:10Z")

</div>

Hello  
I am quite new to the postgress .can u please suggest how do belo

- login to the leader
  - check pg\_stat\_replication etc --\>is it a command or log file
  - check both postgres and patroni logs --\>i did not found any issues

- login REPLICA and check the postgres log --\>where is this log,is not same as postgress log

---

<div class="post-metadata">

**Author:** ![Robert\_Bernier](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/robert_bernier/32/1367_2.png) [@Robert\_Bernier](https://forums.percona.com/u/Robert_Bernier)\
**Post date:** [September 6, 2023, 12:34pm UTC](https://forums.percona.com/t/postgresql-ha-with-patroni-always-showing-streaming/24669/9 "2023-09-06T12:34:52Z")

</div>

Hi,

In regards to replication refer to the documentation [here](https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-REPLICATION-VIEW) and [here](https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-REPLICATION-SLOTS-VIEW).

In regards to logging you’ll need to check both your postgres and patroni configuration files in order to locate where the logs are located.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![Robert\_Bernier](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/robert_bernier/32/1367_2.png) [@Robert\_Bernier](https://forums.percona.com/u/Robert_Bernier)\
**Post date:** [September 29, 2023, 7:38pm UTC](https://forums.percona.com/t/postgresql-ha-with-patroni-always-showing-streaming/24669/10 "2023-09-29T19:38:49Z")

</div>

I was doing some research on another topic and I came across the answer for this issue. I’m surprised nobody else talked about this but it reading the patroni release notes you can see that the messaging was explicitly changed.

Hope this helps.

 ![Screenshot_20230929_114401](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/d/d9f6870a8dbd22ae3dd9d315b094fe6f17f7584e.png)
