Fixed kind mismatch error when deadlock error occured.
authorYoshiyuki Asaba <y-asaba at pgfoundry.org>
Wed, 11 Jul 2007 01:40:17 +0000 (01:40 +0000)
committerYoshiyuki Asaba <y-asaba at pgfoundry.org>
Wed, 11 Jul 2007 01:40:17 +0000 (01:40 +0000)
commit9c3ac27bb2902830b5cc8b079faedbeb3badccee
tree17c074404a32dc02ec6532a9bf4d192694c1ea9a
parent28befcb360d4b4a97f571f28793367722f69e292
Fixed kind mismatch error when deadlock error occured.
The problem is the following senario.

  A: BEGIN:
  B: BEGIN;
  A: LOCK TABLE t1 IN SHARE ROW EXCLUSIVE MODE;
  B: LOCK TABLE t2 IN SHARE ROW EXCLUSIVE MODE;
  A: LOCK TABLE t2 IN SHARE ROW EXCLUSIVE MODE;
  B: LOCK TABLE t1 IN SHARE ROW EXCLUSIVE MODE;

Transaction "A" aborts on master node, but it completes on another
nodes. It causes wrong failover.

So pgpool checks deadlock error(code == '40P01') and sends error query
to another nodes.
pool.h
pool_process_query.c
pool_stream.c