I am trying to implement replication and load balancing on my Ubuntu i686 athlon i386 GNU/Linux.for creating database clustures I have installed postgresql contrib 9.1.11 having initially database clusture in directory /var/lib/postgresql/9.1/main.

By using initdb command i have created two other database clusters under directories /usr/local/pgsql/data and /usr/local/pgsql/standby under port 5433 and 5434 respectively. Changes in postgresql.conf and pg_hba.conf files of both clusters as follows:

In postgresql.conf:

wal_level = hot_standby
hot_standby = on 
log_destination = 'stderr' 
logging_collector = on 
log_statement = 'all' 

In pg_hba.conf:

local   all             all                                    trust
host    all             all               md5
host    all             all             ::1/128                 md5
host    all             all                  md5
local   replication     postgres                                trust
host    replication     postgres            trust
host    replication     postgres        ::1/128                 trust

After that I have installed pgpool to by command sudo apt-get install pgpool2. This installation create directory in /etc/pgpool containing files as follows


Changes pgpool.conf as follows:

listen_addresses = '*'
port = 9999
backend_hostname0 = 'localhost'                                  
backend_port0 = 5432                                   
backend_weight0 = 1                                  
backend_data_directory0 = '/var/lib/postgresql/9.1/main'                                  
backend_flag0 = 'ALLOW_TO_FAILOVER'

backend_hostname1 = 'localhost'                                  
backend_port1 = 5433                                   
backend_weight1 = 1                                  
backend_data_directory1 = '/var/local/pgsql/data'                                  
backend_flag1 = 'ALLOW_TO_FAILOVER'

backend_hostname2 = 'localhost'                                  
backend_port0 = 5434                                   
backend_weight0 = 1                                  
backend_data_directory0 = '/var/local/pgsql/data'                                 
backend_flag0 = 'ALLOW_TO_FAILOVER'

pool_hba.conf file as follows:

local   all         all                               trust
host    all         all          trust

Make entry in pcp.conf of postgresql user with md5 password. restart pgpool /etc/init.d/pgpool2 start command and it started.

But when i am trying to use command psql -p 9999 then it throws error as follows:

bpsql: ERROR: MD5 authentication is unsupported in replication, master-slave and parallel modes.
HINT: check pg_hba.conf**.

I have lot of googlee but I am not getting any solution. Please help me to find solution and suggest me if I am doing anything wrong.

1 Answer 1


This exact error message is in the FAQ.

You have md5 authentication configured in pg_hba.conf and trust authentication (meaning no authentication whatsoever) in pool_hba.conf.

You need to configure either trust authentication or md5 authentication in both files.

  • thank a lot for your reply,but i had uninstalled pgpool2 and reinstall it by using apt-get install command.pgpool2 is starting but whenever i'm trying to execute command "psql -p 9999" then it is throwing error as:"psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.9999"?" i am unable to find file "pgpool.conf". Feb 24, 2014 at 6:02

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.