pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Cottenceau <gc@mnc.ch>
To: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: v2 protocol: is it still used?
Date: Fri, 05 Aug 2016 15:53:36 +0200
Message-ID: <m3oa578gpr.fsf@mnc.ch> (raw)
In-Reply-To: <CAB=Je-Hpy7reDBFSc8M2GfizH4LAQ6TefZ5-LjTeL97CBOBQXA@mail.gmail.com>
References: <CAB=Je-FRZd+cmujEN1g3108j-+hxPqFFoJNAtTtYpZQQF3HZaA@mail.gmail.com>
	<m3oa57bkgs.fsf@mnc.ch>
	<CAB=Je-Hpy7reDBFSc8M2GfizH4LAQ6TefZ5-LjTeL97CBOBQXA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

Vladimir Sitnikov <sitnikov.vladimir 'at' gmail.com> writes:

> Guillaume Cottenceau <gc@mnc.ch>:
>
>     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



view thread (4+ messages)

Message-ID: <m3oa578gpr.fsf@mnc.ch>
Permalink:  ../m3oa578gpr.fsf@mnc.ch/
Also on:    postgresql.org/message-id/m3oa578gpr.fsf@mnc.ch

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: gc@mnc.ch, sitnikov.vladimir@gmail.com
  Subject: Re: v2 protocol: is it still used?
  In-Reply-To: <m3oa578gpr.fsf@mnc.ch>
  References: <CAB=Je-FRZd+cmujEN1g3108j-+hxPqFFoJNAtTtYpZQQF3HZaA@mail.gmail.com> <m3oa57bkgs.fsf@mnc.ch> <CAB=Je-Hpy7reDBFSc8M2GfizH4LAQ6TefZ5-LjTeL97CBOBQXA@mail.gmail.com> <m3oa578gpr.fsf@mnc.ch>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox