[Pgpool-committers] pgpool - pgpool-II: Fix bug with prepared statement deallocation:
User T-ishii
t-ishii at pgfoundry.org
Wed Jul 15 06:09:09 UTC 2009
Log Message:
-----------
Fix bug with prepared statement deallocation:
Subject: [Pgpool-general] Pgpool probelms
From: Nimesh Satam <nimesh.satam at gmail.com>
To: pgpool-general at pgfoundry.org
Cc: Nimesh Satam <nimesh.zedo at gmail.com>
Date: Wed, 17 Jun 2009 11:31:37 +0530
This was caused a bug in reset_backend().
if (qcnt >= qn + prepared_list.cnt)
{
reset_prepared_list(&prepared_list);
return 2;
}
send_deallocate(backend, &prepared_list, qcnt - qn);
return 1;
Problem is, send_deallocate -> SimpleQuery("DEALLOCATE") calls
del_prepared_list, which will decrement prepared_list.cnt. In short,
incrementing of qcnt *and* decrementing of prepared_list.cnt happen at
the same time. So deallocate is only called 1/2 times than it should
be.
Bug analysis and fix provided by Akio Ishida.
Modified Files:
--------------
pgpool-II:
pool_process_query.c (r1.145 -> r1.146)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgpool/pgpool-II/pool_process_query.c?r1=1.145&r2=1.146)
More information about the Pgpool-committers
mailing list