[pgpool-general: 3621] Expected behaviour in master/slave mode when the slave dies?

M M manicmikey at hotmail.com
Tue Apr 14 01:20:22 JST 2015


Hello,

Given the following (abbreviated) pgpool-II configuration:

--------------------
connection_cache          = off
load_balance_mode         = off
master_slave_mode         = on
replication_mode          = off

backend_hostname0       = <master-host>
backend_flag0           = 'ALLOW_TO_FAILOVER'

backend_hostname1       = <slave-host>
backend_flag1           = 'ALLOW_TO_FAILOVER'

health_check_period         = 0
fail_over_on_backend_error  = 0
search_primary_node_timeout = 0
--------------------

Is it expected behaviour that connections to the MASTER would hang if the SLAVE fails?  I understand that "fail_over_on_backend_error=0" would prevent pgpool-II from removing the failed slave node from the configuration, but I would have expected the primary/master would continue to service requests normally?

My interpretation is that pgpool must be able to communicate to all "healthy" (status=2) nodes in order to establish a new connection - is this correct?

When the slave/standby is failed, debug logging on the master shows the following:
--------------------
2015-04-13 14:45:33 DEBUG: pid 28131: I am 28131 accept fd 6
2015-04-13 14:45:33 LOG:   pid 28131: connection received: host=xxxx port=33591
2015-04-13 14:45:33 DEBUG: pid 28131: Protocol Major: 1234 Minor: 5679 database:  user:
2015-04-13 14:45:33 DEBUG: pid 28131: SSLRequest from client
2015-04-13 14:45:33 DEBUG: pid 28131: read_startup_packet: application_name: psql
2015-04-13 14:45:33 DEBUG: pid 28131: Protocol Major: 3 Minor: 0 database: postgres user: xxxx
2015-04-13 14:45:33 DEBUG: pid 28131: new_connection: connecting 0 backend
2015-04-13 14:45:33 DEBUG: pid 28131: new_connection: connecting 1 backend
2015-04-13 14:45:33 ERROR: pid 28131: connect_inet_domain_socket: getsockopt() detected error: Connection refused
2015-04-13 14:45:33 ERROR: pid 28131: connection to <slave-host>(5432) failed
2015-04-13 14:45:33 ERROR: pid 28131: new_connection: create_cp() failed
2015-04-13 14:45:33 LOG:   pid 28131: new_connection: do not failover because fail_over_on_backend_error is off
2015-04-13 14:45:33 DEBUG: pid 15335: reap_handler called
2015-04-13 14:45:33 DEBUG: pid 15335: reap_handler: call wait3
2015-04-13 14:45:33 DEBUG: pid 15335: child 28131 exits with status 256
2015-04-13 14:45:33 DEBUG: pid 15335: fork a new child pid 28138
2015-04-13 14:45:33 DEBUG: pid 15335: reap_handler: normally exited
2015-04-13 14:45:33 DEBUG: pid 28138: I am 28138
2015-04-13 14:45:33 DEBUG: pid 28138: pool_initialize_private_backend_status: initialize backend status
--------------------

Versions in use: pgpool-II (3.3.4), postgresql (9.3.5)

Many thanks in advance.

Regards,
M 		 	   		  


More information about the pgpool-general mailing list