0

I'm facing a problem with my pgpool setup. Currently, this is my requirement based on the pgpool documentation here :

Server A : Install with PostgreSQL database. Run as primary server

Server B : Install with PostgreSQL database. Run as secondary server

Server C : Install with pgpool and pgpoolAdmin. Run as web server.

The problem starts when I'm accessing the pgpoolAdmin through Apache web server.

pgpool Status

Both of the PostgreSQL databases are running as primary servers. It is supposed to run one as standby and the other as primary, for when failover occurs. Maybe I've messed up something when configuring this set up, but I don't know what it is. Can someone help me with this?

EDIT : Below is my pgpool.conf file

master_slave_mode = on                                      
master_slave_sub_mode = 'stream'   
wd_life_point = 3    
wd_lifecheck_query = 'SELECT 1'   
backend_socket_dir = '/tmp'    
backend_hostname0 = '192.168.1.134'   
backend_port0 = 5432   
backend_weight0 = 1    
backend_data_directory0 = '/usr/local/pgsql/data'   
backend_flag0= 'ALLOW_TO_FAILOVER'    
backend_hostname1 = '192.168.1.136'    
backend_port1 = 5432   
backend_weight1 = 1   
backend_data_directory1 = '/usr/local/pgsql/data'   
backend_flag1= 'ALLOW_TO_FAILOVER'
  • Now what have you specified in the config? Sounds like you feel a discrepancy between it and the status report above. – dezso Nov 8 '12 at 5:40
  • @dezso what do you want to see?is it the posgresql conf or the pgpool conf?i can put it in my post – user119720 Nov 8 '12 at 6:35
  • We need the pgpool conf, I think. – dezso Nov 8 '12 at 7:28
  • i've already edit.see my post above – user119720 Nov 8 '12 at 8:21
  • @dezso i've see you have edited my post.so can you tell me what is the problem with my setup? – user119720 Nov 12 '12 at 3:52
1

Old post, but as I have just been through the pain of configuring pgpool, and have encountered similar problems, I'll answer here.

I have exactly the same setup, but I made the choice to go through this excellent tutorial (in 6 parts ouch). It intends to build a full pgpool/pgsql HA infrastructure, where there is no single point failure with one pgpool server, as two pgpool are installed along two postgresql primary and standby servers in streaming replication.

Anyway it is quite easy to adapt in order to keep pgpool one one separate server like I did.

Regarding our problem here, I think it could be related to an incomplete primary/standby setup. And anyone having this problem shall try to setup streaming replication at postgresql level before trying to attach new node with pgpool (particularly when you have a database that is not empty).

In postgresql.conf I would check REPLICATION section on both servers and make sure that the standby server has hot_standby = on. Make sure also that you have correct recovery.conf file on standby server.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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