Thread: Forward compatibility of drivers

Forward compatibility of drivers

From
Robert Jacoby
Date:
I have an app that is using the 8.2-504.jdbc3 driver. It's currently hitting an 8.3.8 pgsql db. I would like to upgrade the database to 9.1.4. The benefits of upgrading to the latest driver aside, is using the 8.2 driver against a 9.1.4 database supported? If not, any idea what landmines I can expect?

I saw backward compatibility notes that the 9.1-902 driver is backward compatible with 7.2 postgresql+, but nothing regarding forward compatibility of the drivers.

Thanks,
Bob 

Re: Forward compatibility of drivers

From
Dave Cramer
Date:
Depending on what you are doing it will probably work. This assumes
you are only doing basic CRUD . It will only use protocol version 2.
Of course there's no guarantees. It is an unintended use case.

Better question is why would you not want to upgrade to the latest driver ?

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


On Tue, Jun 26, 2012 at 1:21 PM, Robert Jacoby
<robert.jacoby@rackspace.com> wrote:
> I have an app that is using the 8.2-504.jdbc3 driver. It's currently hitting
> an 8.3.8 pgsql db. I would like to upgrade the database to 9.1.4. The
> benefits of upgrading to the latest driver aside, is using the 8.2 driver
> against a 9.1.4 database supported? If not, any idea what landmines I can
> expect?
>
> I saw backward compatibility notes that the 9.1-902 driver is backward
> compatible with 7.2 postgresql+, but nothing regarding forward compatibility
> of the drivers.
>
> Thanks,
> Bob

Re: Forward compatibility of drivers

From
Robert Jacoby
Date:
"Better question is why would you not want to upgrade to the latest
driver?"


hehe. It's not a question of "want". =)

Bob

On 6/26/12 1:27 PM, "Dave Cramer" <pg@fastcrypt.com> wrote:

>Depending on what you are doing it will probably work. This assumes
>you are only doing basic CRUD . It will only use protocol version 2.
>Of course there's no guarantees. It is an unintended use case.
>
>Better question is why would you not want to upgrade to the latest driver
>?
>
>Dave Cramer
>
>dave.cramer(at)credativ(dot)ca
>http://www.credativ.ca
>
>
>On Tue, Jun 26, 2012 at 1:21 PM, Robert Jacoby
><robert.jacoby@rackspace.com> wrote:
>> I have an app that is using the 8.2-504.jdbc3 driver. It's currently
>>hitting
>> an 8.3.8 pgsql db. I would like to upgrade the database to 9.1.4. The
>> benefits of upgrading to the latest driver aside, is using the 8.2
>>driver
>> against a 9.1.4 database supported? If not, any idea what landmines I
>>can
>> expect?
>>
>> I saw backward compatibility notes that the 9.1-902 driver is backward
>> compatible with 7.2 postgresql+, but nothing regarding forward
>>compatibility
>> of the drivers.
>>
>> Thanks,
>> Bob


Re: Forward compatibility of drivers

From
Dave Cramer
Date:
I figured as much, so what is stopping you from changing the postgresql jar ?

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


On Tue, Jun 26, 2012 at 2:36 PM, Robert Jacoby
<robert.jacoby@rackspace.com> wrote:
> "Better question is why would you not want to upgrade to the latest
> driver?"
>
>
> hehe. It's not a question of "want". =)
>
> Bob
>
> On 6/26/12 1:27 PM, "Dave Cramer" <pg@fastcrypt.com> wrote:
>
>>Depending on what you are doing it will probably work. This assumes
>>you are only doing basic CRUD . It will only use protocol version 2.
>>Of course there's no guarantees. It is an unintended use case.
>>
>>Better question is why would you not want to upgrade to the latest driver
>>?
>>
>>Dave Cramer
>>
>>dave.cramer(at)credativ(dot)ca
>>http://www.credativ.ca
>>
>>
>>On Tue, Jun 26, 2012 at 1:21 PM, Robert Jacoby
>><robert.jacoby@rackspace.com> wrote:
>>> I have an app that is using the 8.2-504.jdbc3 driver. It's currently
>>>hitting
>>> an 8.3.8 pgsql db. I would like to upgrade the database to 9.1.4. The
>>> benefits of upgrading to the latest driver aside, is using the 8.2
>>>driver
>>> against a 9.1.4 database supported? If not, any idea what landmines I
>>>can
>>> expect?
>>>
>>> I saw backward compatibility notes that the 9.1-902 driver is backward
>>> compatible with 7.2 postgresql+, but nothing regarding forward
>>>compatibility
>>> of the drivers.
>>>
>>> Thanks,
>>> Bob
>

Re: Forward compatibility of drivers

From
Robert Jacoby
Date:
It's a matter of finite resources. If the old driver supported the new db
then we wouldn't have to redeploy the applications that use it and may be
able to get away with doing smokes tests after switching the database.
Redeploying is not trivial and requires quite a bit of coordination. We're
also not just talking 1 app.

Given that it's not supported, then we would need to do much more
substantial testing to verify the way we use the old driver would still
work with the newer database. At that point the amount of testing likely
dwarfs the cost of redeploying the apps with the newer jar and we might as
well upgrade.

Bob

On 6/26/12 1:38 PM, "Dave Cramer" <pg@fastcrypt.com> wrote:

>I figured as much, so what is stopping you from changing the postgresql
>jar ?
>
>Dave Cramer
>
>dave.cramer(at)credativ(dot)ca
>http://www.credativ.ca
>
>
>On Tue, Jun 26, 2012 at 2:36 PM, Robert Jacoby
><robert.jacoby@rackspace.com> wrote:
>> "Better question is why would you not want to upgrade to the latest
>> driver?"
>>
>>
>> hehe. It's not a question of "want". =)
>>
>> Bob
>>
>> On 6/26/12 1:27 PM, "Dave Cramer" <pg@fastcrypt.com> wrote:
>>
>>>Depending on what you are doing it will probably work. This assumes
>>>you are only doing basic CRUD . It will only use protocol version 2.
>>>Of course there's no guarantees. It is an unintended use case.
>>>
>>>Better question is why would you not want to upgrade to the latest
>>>driver
>>>?
>>>
>>>Dave Cramer
>>>
>>>dave.cramer(at)credativ(dot)ca
>>>http://www.credativ.ca
>>>
>>>
>>>On Tue, Jun 26, 2012 at 1:21 PM, Robert Jacoby
>>><robert.jacoby@rackspace.com> wrote:
>>>> I have an app that is using the 8.2-504.jdbc3 driver. It's currently
>>>>hitting
>>>> an 8.3.8 pgsql db. I would like to upgrade the database to 9.1.4. The
>>>> benefits of upgrading to the latest driver aside, is using the 8.2
>>>>driver
>>>> against a 9.1.4 database supported? If not, any idea what landmines I
>>>>can
>>>> expect?
>>>>
>>>> I saw backward compatibility notes that the 9.1-902 driver is backward
>>>> compatible with 7.2 postgresql+, but nothing regarding forward
>>>>compatibility
>>>> of the drivers.
>>>>
>>>> Thanks,
>>>> Bob
>>


Re: Forward compatibility of drivers

From
Craig Ringer
Date:
On 06/27/2012 02:50 AM, Robert Jacoby wrote:
> It's a matter of finite resources. If the old driver supported the new db
> then we wouldn't have to redeploy the applications that use it and may be
> able to get away with doing smokes tests after switching the database.
> Redeploying is not trivial and requires quite a bit of coordination. We're
> also not just talking 1 app.
>
> Given that it's not supported, then we would need to do much more
> substantial testing to verify the way we use the old driver would still
> work with the newer database. At that point the amount of testing likely
> dwarfs the cost of redeploying the apps with the newer jar and we might as
> well upgrade.

Yep. In particular, if your app relies on *any* JDBC metadata, either
directly or via an ORM layer or similar, you'll want a driver version
equal to or newer than the database version, because the pg_catalog.*
schema changes somewhat from major version to major version to
accomodate new features, fixes and enhancements. Old drivers won't like
it when a field they expect to be there isn't, a type has changed, etc.

Using an old driver may even expose you to possibly faulty data
access/writes if you use bytea fields, because older drivers don't know
about bytea_format and the new 'hex' default. You'll also have to change
other database settings like standard_conforming_strings .

If you *don't* use JDBC metadata and you can change some settings for
bytea_format, standard_conforming_strings, etc on your updated databases
you might be OK, but I wouldn't particularly recommend it.

--
Craig Ringer