Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have two PostgreSQL servers running in master-slave streaming replication mode, behind pgpool.

When we activate master_slave mode in pgpool.conf, we get following error:

do_md5 failed in slot 1

When we add a host with the md5 method in pool_hba.conf, we're getting this error:

md5 token is invalid

Without master_slave mode, pgpool connects successfully. Where to dig?

share|improve this question

Solution, in 2 words: install latest pgpool2 from sources

Step by step solution:

  1. Make sure that you have pgpool2 with version 3+
  2. Create pool_passwd with pg_md5 command
  3. Make sure, that you have md5 in pool_hba.conf. If you have pgpool2 from deb - it will not support md5 token in pool_hba.conf
share|improve this answer

Here are steps wich helped me:

  1. You need to check pgpool.conf for enable_pool_hba = on.

  2. Here is a table with description of errors on pg_hba.conf and pool_hba.conf: FAQ

  3. Also check md5 hash for pool_passwd, I got it from database using query:

    select passwd from pg_shadow where usename = 'username';

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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