PostgreSQL HA with Patroni always showing streaming

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 |
±---------------±-----------±--------±----------±—±----------+

any answer on it?
is it bug?

Hi,

This is what you should normally see.

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.

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.

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.

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 |
    ±---------------±-----------±--------±----------±—±----------+

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

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

Hi,

In regards to replication refer to the documentation here and here.

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.

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.