I have installed both pgpool and postgresql via apt.

In pgpool.conf, I have made the changes necessary to use replication mode, as well as my two postgresql databases (currently all running on the same host).

I am unable to figure out what I need to add to my pg_hba.conf files in order to have pgpool connect to them. I keep getting this error

createdb: could not connect to database postgres: ERROR:  MD5 authentication 
is unsupported in replication, master-slave and parallel modes.
HINT:  check pg_hba.conf

both of my pg_hba.conf files look like

local   all             postgres                                peer

local   all             all                                     peer
local   all             postgres                                md5

host    all             all               md5

host    all             all             ::1/128                 md5

local   replication     postgres                                peer
host    replication     postgres            md5

and my pool_hba.conf looks like

local   all         all                               trust
local   all         postgres                          md5
local   all         all                               md5     

host    all         all          trust

What am I missing in order to have pgpool connect to my databases?


4 Answers 4


It looks like your default authentication mode for TCP/IP connections (host) is md5. So at a guess, you have PgPool connecting over TCP/IP.

Change the auth mode for loopback connections on tcp/ip, or use unix sockets with pgpool (usually by omitting the host setting).

If you're still stuck after reading:

19.1. The pg_hba.conf File and
Chapter 19. Client Authentication

in the PostgreSQL 9.4 documentation, and you can't find answers elsewhere (there are lots of related questions on Stack Overflow), let me know and I'll give you a step by step if I have a chance.


I messed around with this problem for several hours and then finally found the solution.

Read the pgpool-II FAQ and look at the table:

Referenced Table

You cannot leave the default entries of trust in pool_hba.conf. I commented out the trust entries and added my md5 entries.


As an additional check, after ensuring matching MD5 METHODS in pg_hba.conf and pool_hba.conf,

make sure to set

 enable_pool_hba = on 

in pgpool.conf


I was also facing same issue. I just do some setting in pool_hba.conf and add md5 encrypted password in pcp.confi & pool_passwd file after that reload the pool setting and start it again. After these setting. MY application is working fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.