[pgpool-committers: 3862] pgpool: Fix failing in re-syncing primary and standby when "ready for q

Tatsuo Ishii ishii at postgresql.org
Mon Mar 20 19:09:34 JST 2017


Fix failing in re-syncing primary and standby when "ready for query" received.

After sending a sync message to all backend nodes, eventually a ready
for query message comes from all nodes. So read_data_from_backend()
syncs all nodes by reading and discarding messages until "ready for
query" is coming. Before it checks whether data is ready or not before
reading from socket with timeout to 0 when data input buffer is
empty. However this is not reliable since the data may not be ready at
the timing. Moreover this could lead to a kind mismatch error since
the re-syncing process is aborted. Now it is safe to assume that data
must be eventually ready, so the timeout is not necessary anymore.

[See pgpool-hacker: 2167] for more details.

Branch
------
bug271

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

Modified Files
--------------
src/protocol/pool_process_query.c | 11 +++++------
src/protocol/pool_proto_modules.c |  3 ++-
2 files changed, 7 insertions(+), 7 deletions(-)



More information about the pgpool-committers mailing list