pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Forward compatibility of drivers
6+ messages / 3 participants
[nested] [flat]

* Forward compatibility of drivers
@ 2012-06-26 17:21  Robert Jacoby <robert.jacoby@RACKSPACE.COM>
  0 siblings, 1 reply; 6+ messages in thread

From: Robert Jacoby @ 2012-06-26 17:21 UTC (permalink / raw)
  To: pgsql-jdbc

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

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Forward compatibility of drivers
@ 2012-06-26 18:27  Dave Cramer <pg@fastcrypt.com>
  parent: Robert Jacoby <robert.jacoby@RACKSPACE.COM>
  0 siblings, 1 reply; 6+ messages in thread

From: Dave Cramer @ 2012-06-26 18:27 UTC (permalink / raw)
  To: Robert Jacoby <robert.jacoby@rackspace.com>; +Cc: pgsql-jdbc

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Forward compatibility of drivers
@ 2012-06-26 18:36  Robert Jacoby <robert.jacoby@RACKSPACE.COM>
  parent: Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Robert Jacoby @ 2012-06-26 18:36 UTC (permalink / raw)
  To: Dave Cramer <pg@fastcrypt.com>; +Cc: pgsql-jdbc

"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




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Forward compatibility of drivers
@ 2012-06-26 18:38  Dave Cramer <pg@fastcrypt.com>
  parent: Robert Jacoby <robert.jacoby@RACKSPACE.COM>
  0 siblings, 1 reply; 6+ messages in thread

From: Dave Cramer @ 2012-06-26 18:38 UTC (permalink / raw)
  To: Robert Jacoby <robert.jacoby@rackspace.com>; +Cc: pgsql-jdbc

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
>



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Forward compatibility of drivers
@ 2012-06-26 18:50  Robert Jacoby <robert.jacoby@RACKSPACE.COM>
  parent: Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Robert Jacoby @ 2012-06-26 18:50 UTC (permalink / raw)
  To: Dave Cramer <pg@fastcrypt.com>; +Cc: pgsql-jdbc

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
>>




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Forward compatibility of drivers
@ 2012-06-27 06:30  Craig Ringer <ringerc@ringerc.id.au>
  parent: Robert Jacoby <robert.jacoby@RACKSPACE.COM>
  0 siblings, 0 replies; 6+ messages in thread

From: Craig Ringer @ 2012-06-27 06:30 UTC (permalink / raw)
  To: Robert Jacoby <robert.jacoby@RACKSPACE.COM>; +Cc: Dave Cramer <pg@fastcrypt.com>; pgsql-jdbc

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2012-06-27 06:30 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-06-26 17:21 Forward compatibility of drivers Robert Jacoby <robert.jacoby@RACKSPACE.COM>
2012-06-26 18:27 ` Dave Cramer <pg@fastcrypt.com>
2012-06-26 18:36   ` Robert Jacoby <robert.jacoby@RACKSPACE.COM>
2012-06-26 18:38     ` Dave Cramer <pg@fastcrypt.com>
2012-06-26 18:50       ` Robert Jacoby <robert.jacoby@RACKSPACE.COM>
2012-06-27 06:30         ` Craig Ringer <ringerc@ringerc.id.au>

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