[pgpool-committers: 270] pgpool: Fix hungup when query fetched from cache and then hit ^D with p

Tatsuo Ishii ishii at postgresql.org
Mon Jun 4 00:53:13 JST 2012

Fix hungup when query fetched from cache and then hit ^D with psql in
an explicit transaction. First primary and standby state is 'T'(idle
in transaction). After fetching cache, pool_fetch_from_memory_cache()
unconditionally sets transaction state to 'I'(idle) on *only* primary.
Then ABORT is going to be sent by reset_query_list. SimpleQuery calls
pool_send_and_wait. However pool_send_and_wait does not send
COMMIT/ABORT to the node which is in 'I' state, so only standby
receives ABORT command. After this, ProcessBackendresponse expects to
receive response from primary, which will never happen of course.
Solution is, fix pool_fetch_from_memory_cache() not to set transaction
state, rather inherit previous state.



Modified Files
pool_memqcache.c |    8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

More information about the pgpool-committers mailing list