[pgpool-committers: 2322] pgpool: Fix for 0000116: LISTEN Notifications Not Reliably Delivered Us

Muhammad Usama m.usama at gmail.com
Tue Nov 25 23:01:46 JST 2014


Fix for 0000116: LISTEN Notifications Not Reliably Delivered Using JDBC4 Demonstrator

The issue happens in master slave mode with load balancing when the client is
doing extended query messaging.
The scenario is IS_MASTER_NODE_ID points to the current load balanced selected
node, which could be the standby node if the current selected node to send query
is not a primary node.

But the difference with the NOTIFY is that even when the query is sent to the
read only replica (SELECT 1; in this case for getting the pending notifications
from the server) the NOTIFY is returned to pgpool-II from the primary backend
node irrespective of the fact the primary node did not received the SELECT 1 query.

And currently pgpool-II expects that it will either get the NOTIFY message from
master node (which is standby read only replica in this scenario) or from all the
attached backends including the master node.  But none of this happens actually
and NOTIFY from standby never arrives. So pgpool-II gets stuck on waiting for NOTIFY
message from the standby backend node.

The commit by forwarding the notification message to frontend when pgpool-II is
in master slave configuration even when the message is received from a node other
than master backed node.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=328c53b86ec83d3f02f64a22e6821a6cde00b61f

Modified Files
--------------
src/protocol/pool_process_query.c |   62 +++++++++++++++++++++++++++----------
1 file changed, 46 insertions(+), 16 deletions(-)



More information about the pgpool-committers mailing list