Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 21864B62B54 for ; Fri, 3 Jun 2011 10:54:11 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 38127-01 for ; Fri, 3 Jun 2011 13:54:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id BC983B62B5A for ; Fri, 3 Jun 2011 10:54:03 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p53DrxW7025345; Fri, 3 Jun 2011 09:54:00 -0400 (EDT) To: Michal Politowski cc: pgsql-general@postgresql.org Subject: Re: Mixed up protocol packets in server response? In-reply-to: <20110603130357.GA7961@meep.pl> References: <20110601130649.GA21333@meep.pl> <4DE6DE56.8030008@postnewspapers.com.au> <20110603130357.GA7961@meep.pl> Comments: In-reply-to Michal Politowski message dated "Fri, 03 Jun 2011 15:03:57 +0200" Date: Fri, 03 Jun 2011 09:53:59 -0400 Message-ID: <25344.1307109239@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201106/68 X-Sequence-Number: 176501 Michal Politowski writes: > Thinking aloud: If this is, as it is to be suspected, an application-side problem, > there is at first sight not much space in the application where it could hide. The data is > mixed up in a driver buffer, two method calls from the standard library > socket code. There is the VisibleBufferedInputStream there. Could it do > something like this? Maybe if the connection was erroneously used from two threads > concurrently? The connections are pooled via commons-dbcp BasicDataSource > and queries are executed via Spring JdbcTemplate within Spring-configured > transaction. No passing connections by hand anywhere, everything should be > nicely thread-bound. Still, if not here, where could it go wrong? You'd probably be better off asking these questions in pgsql-jdbc ... a lot of us here don't even speak Java. regards, tom lane