Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVfZN-0001Oh-KJ for pgsql-jdbc@arkaria.postgresql.org; Fri, 05 Aug 2016 13:53:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bVfZN-0003lC-70 for pgsql-jdbc@arkaria.postgresql.org; Fri, 05 Aug 2016 13:53:49 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bVfZM-0003gq-5h for pgsql-jdbc@postgresql.org; Fri, 05 Aug 2016 13:53:48 +0000 Received: from mail.mnc.ch ([62.2.77.205]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bVfZF-0003Iw-7x for pgsql-jdbc@postgresql.org; Fri, 05 Aug 2016 13:53:46 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.mnc.ch (Postfix) with ESMTP id E8BB042CA; Fri, 5 Aug 2016 15:53:36 +0200 (CEST) X-Virus-Scanned: amavisd-new at example.com Received: from mail.mnc.ch ([127.0.0.1]) by localhost (mail.op.lan [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4euP-whCYH5b; Fri, 5 Aug 2016 15:53:36 +0200 (CEST) Received: from gc.localdomain (62-2-77-204.static.cablecom.ch [62.2.77.204]) by mail.mnc.ch (Postfix) with ESMTP id C82DA42C3; Fri, 5 Aug 2016 15:53:36 +0200 (CEST) Received: by gc.localdomain (Postfix, from userid 500) id 8972E18EDDE; Fri, 5 Aug 2016 15:53:36 +0200 (CEST) To: Vladimir Sitnikov Cc: List Subject: Re: v2 protocol: is it still used? References: From: Guillaume Cottenceau X-Hashcash: 1:21:160805:sitnikov.vladimir@gmail.com::dtpOv4hNlIS1sdtb:00000000000000000000000000000000000Uxu X-Hashcash: 1:21:160805:pgsql-jdbc@postgresql.org::HgP2X4ciJHoKj22O:0000000000000000000000000000000000000Wvg Date: Fri, 05 Aug 2016 15:53:36 +0200 In-Reply-To: (Vladimir Sitnikov's message of "Fri\, 05 Aug 2016 13\:41\:47 +0000") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -3.1 (---) 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 Vladimir Sitnikov writes: > Guillaume Cottenceau : > > The only workaround I found back then, > was to use protocol v2 (IIRC prepared statements are fully client > side in protocol v2?). I noticed recently though that it's not > going to be able anymore soon, because the 9.5 backend breaks on > the driver passing autocommit=true anyways. > > > Workarounds exist for v3 as well: for instance, completely disable usage of > server-prepared statements. > Alternatively, we could even implement "use server-prepared statement at most 5 > times" (so the backend never switches to a generic plan). Thanks for the hints! > I wonder what would be the best way to handle current protocolVersion= > 2 installations: > 1) ignore protocolVersion=2 and just use v3 > 2) throw exception "A connection could not be made using the requested protocol > 2" > > Even though #1 might not be that expected, however I believe it will provide > smooth migration to never pgjdbc versions without "manual configuration changes > here and there" I humbly think #2 is more reliable and clear. -- Guillaume Cottenceau -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc