Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VadWA-0004Tg-LF for pgsql-jdbc@arkaria.postgresql.org; Mon, 28 Oct 2013 03:29:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VadWA-0007Ae-13 for pgsql-jdbc@arkaria.postgresql.org; Mon, 28 Oct 2013 03:29:26 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VadW9-0007AX-1j for pgsql-jdbc@postgresql.org; Mon, 28 Oct 2013 03:29:25 +0000 Received: from outmail148109.authsmtp.co.uk ([62.13.148.109]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VadW1-0007Oc-SY for pgsql-jdbc@postgresql.org; Mon, 28 Oct 2013 03:29:24 +0000 Received: from mail-c237.authsmtp.com (mail-c237.authsmtp.com [62.13.128.237]) by punt12.authsmtp.com (8.14.2/8.14.2) with ESMTP id r9S3TGbB076004; Mon, 28 Oct 2013 03:29:16 GMT Received: from ayaki.localdomain (106-68-230-217.dyn.iinet.net.au [106.68.230.217]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id r9S3TBAI056568 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 28 Oct 2013 03:29:14 GMT Message-ID: <526DDA06.6010300@2ndquadrant.com> Date: Mon, 28 Oct 2013 11:29:10 +0800 From: Craig Ringer Organization: 2nd Quadrant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: robrez CC: pgsql-jdbc@postgresql.org Subject: Re: Inconsistent: Getting array from result set References: <1382657236721-5775841.post@n5.nabble.com> In-Reply-To: <1382657236721-5775841.post@n5.nabble.com> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Server-Quench: 1ee5786e-3f81-11e3-94fa-002590a135d3 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZeVg0b BQteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFag1bYlpF HGQLWldEUF57W2p/ ag8fbAVbfExGQQdp UFZLQ1VNFgBqBAMA SFwXMRoWBXQ/eHt2 YEBqEHRbWkw0dBMo R0lcEzgbZjFoaX0e URVbagpQJlJXfh9H b1l/BXIOZDEEKBg1 TUcAHRwbFgAXCSJe RQcWLEkOTEAXTHZ0 aB0eATQpEgUMXT86 PlQoMFkZVFwcKVg2 LRM6VE5w X-Authentic-SMTP: 61633235383639.1024:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 106.68.230.217/2525 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org On 10/25/2013 07:27 AM, robrez wrote: > I am encountering inconsistent behavior when getting an array from a result > set that was produced via a prepared statement. > > It seems that the first 5 times the result set is generated from a given > statement, everything is good. > Attempts 6-n do something strange. By default, PgJDBC switches from client-side to server-side prepared statements at five executions. So I'd say you're seeing an issue related to that. Try playing with the prepared statement threshold, see if the problem behaviour changes along with the threshold. See the documentation for details on that. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc