I'm trying to configure a pgpool2 loadbalancer (in a Ubuntu 12.04 server) to balance between 2 postgres nodes (2 ubuntu 12.04 servers).
The main problem is that, if I create a database using pgAdmin (conected to the pgpool2 loadbalancer), it's created in each postgres nodes, but its OID is different in each node and if I try to use that database, it fails (gives me an ERROR: kind mismatch among backeneds etc.). These are my modified options in opt/etc/pgpool2/pgpool.conf:
backend_hostname0 = 'postgres-lb1' backend_port0 = 5432 backend_weight0 = 1 backend_data_directory0 = '/var/lib/postgresql/9.2/main/' backend_flag0 = 'ALLOW_TO_FAILOVER' backend_hostname1 = 'postgres-lb2' backend_port1 = 5432 backend_weight1 = 1 backend_data_directory1 = '/var/lib/postgresql/9.2/main' backend_flag1 = 'ALLOW_TO_FAILOVER' replication_mode = on replicate_select = off load_balance_mode = on pgpool2_hostname = 'postgres-lb'
Another options are set by default.
In /etc/postgresql/9.2/main/postgresql.conf (for each postgres node):
wal_level = hot_standby max_wal_senders = 1 hot_standby = on
and trust user access for postgres user in the network.
Any suggestions? Thank you.