# Postgres - high availability using PGPool - guidance

**URL:** <https://forums.percona.com/t/postgres-high-availability-using-pgpool-guidance/19578>\
**Category:** PostgreSQL\
**Tags:** percona, postgres\
**Created:** [January 11, 2023, 8:37pm UTC](https://forums.percona.com/t/postgres-high-availability-using-pgpool-guidance/19578 "2023-01-11T20:37:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Puneet\_Mathur](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/puneet_mathur/32/8078_2.png) [@Puneet\_Mathur](https://forums.percona.com/u/Puneet_Mathur)\
**Post date:** [January 11, 2023, 8:37pm UTC](https://forums.percona.com/t/postgres-high-availability-using-pgpool-guidance/19578/1 "2023-01-11T20:37:38Z")

</div>

Hi guys

Looking for some guidance.

I have a two node master-slave Postgres setup using streaming replication.

On the third server, I have installed pgpool-ii from the Postgres 14.5 TAR distribution. Installation creates a user called postgres.

In have updated pgpool.conf based on the documentation.

Question - should I be running pgpool under postgres user? ATM, when I start the service (pgpool -n &) manually under postgres, I see a PID created but nothing else. Doesn’t look like it is talking to the two Postgres clusters.

Also, is pgpool the right tool or should I look at something else?

Cheers, Puneet

---

<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:** [January 12, 2023, 2:27pm UTC](https://forums.percona.com/t/postgres-high-availability-using-pgpool-guidance/19578/2 "2023-01-12T14:27:54Z")

</div>

Q: Should I be running pgpool under postgres user?  
A: While it is possible to run it under another distinct user, it is perfectly reasonable running [pgpool](https://www.pgpool.net/docs/42/en/html/index.html) under the postgres user. Placing it under another owner is purely from a security point of view which requires having the necessary permissions administering it.

Q: Is pgpool the right tool or should I look at something else?  
A: Pgpool serves multiple purposes, the caveat though is its complexity and may be a little bit of an overkill if you just want connection pooling:  
- native replication (master-slave, master-master)  
- connection pooling  
- load balancing  
- high availability i.e. automatic failover etc  
- in memory query caching

Q: Doesn’t look like it is talking to the two Postgres clusters.  
A: Without belaboring the point too much, once installed, pgpool does require configuration in order to see your two nodes. Refer here for more about [configuring](https://www.pgpool.net/docs/42/en/html/runtime.html) pgpool.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![Puneet\_Mathur](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/puneet_mathur/32/8078_2.png) [@Puneet\_Mathur](https://forums.percona.com/u/Puneet_Mathur)\
**Post date:** [January 12, 2023, 8:49pm UTC](https://forums.percona.com/t/postgres-high-availability-using-pgpool-guidance/19578/3 "2023-01-12T20:49:01Z")

</div>

Thanks Rob.

I will go through the configuration again.

My use case for pgpool is primarily for automated failover/failback & propotion of clusters. For replication, I have configured native streaming replication in Postgres itself.

Thanks again.

Regards, Puneet
