Re: v2 protocol: is it still used?

From: Guillaume Cottenceau <gc(at)mnc(dot)ch>
To: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: v2 protocol: is it still used?
Date: 2016-08-05 13:53:36
Message-ID: m3oa578gpr.fsf@mnc.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

> Guillaume Cottenceau <gc(at)mnc(dot)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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2016-08-08 13:52:00 Sorry I rejected this by accident
Previous Message Vladimir Sitnikov 2016-08-05 13:41:47 Re: v2 protocol: is it still used?