I'm trying to configure pgpool to use load balance between two servers (Both running Debian 8.2 and Postgresql 9.4). I already have Streaming Replication working between the two (Master in 153 and Slave in 155). Now I installed PgPool and configured with the two servers:
backend_hostname0 = '10.0.0.153'
backend_port0 = 5432
backend_weight0 = 1
backend_data_directory0 = '/var/lib/postgresq/9.4/main'
backend_hostname1 = '10.0.0.155'
backend_port1 = 5432
backend_weight1 = 1
backend_data_directory1 = '/var/lib/postgresq/9.4/main'
and configure pool_hba, pool_passwd, and load_balance_mode is on. My problem is: When i try to use psql via pgpool it displays an error: "psql: FATAL: password authentication failed for user 'postgres'"
BUT if I comment all the section of backend1, changing nothing more, and restart the pgpool2 service, I can connect without problem, in the same machine, using the exact same user and password. I don't know if there's another parameter that I should set in order to use two servers and load balance between them.
I can connect to each backend server from each client with psql just fine, so credentials shouldn't be the problem.
PS: Don't know if that helps. But in pgpool.conf, the replication_mode is off, because I'm using the Streaming Replication, and as far as I heard, it's possible to use load_balance without making replication via pgpool.
Thanks.