Re: Postgres 8.0 upgrade to 9.0

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Atul Goel <Atul(dot)Goel(at)iggroup(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgres 8.0 upgrade to 9.0
Date: 2011-08-01 23:42:29
Message-ID: 4E3739E5.3070204@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1/08/2011 11:07 PM, Atul Goel wrote:
> Hi Forum,
>
> We are planning to upgrade a postgres 8.0 database to postgres 9.0
> (Actually already done in Dev). The application is J2EE application with
> Hibernate. My question are
>
> 1)Is there a list of things that needs to be taken care while
> upgrading(known issues).

Most of them will be taken care of for you if you update Hibernate at
the same time, because the new dialect knows about the changed casting
rules, etc.

You may not need to update it at all, as Hibernate uses pretty simple
SQL most of the time.

> 2)Do I need to upgrade JDBC driver when I upgrade to postgres9.0.

It is very strongly recommended that you do so. The old JDBC driver may
not understand the metadata from newer versions of the server properly,
and will have problems with bytea data.

> 3)If we upgrade JDBC driver will we require to upgrade hibernate dialect?

Not as far as I know. Personally I would be updating Hibernate as well,
but I realize you may not have that option.

> 4)Any other suggestions.

Test. Lots. You're making a *HUGE* version jump, rather than doing small
incremental updates, so you've got more potential pitfalls. If - as it
sounds like - you're not updating the rest of your app at the same time,
you're adding the complexity of mixing old and new versions of software.

If the old version of Hibernate you're using has a bug in its dialects -
or core - that is only triggered on newer versions of Pg, or if it
relies on SQL that used to be accepted by old versions of Pg but is now
rejected (say: implicit casts to text) then you'll get query errors. I'd
want to update Hibernate at the same time so I got the benefit of all
the bug fixes between your version and the new one, and got a version
that will've been tested against current Pg versions.

--
Craig Ringer

POST Newspapers
276 Onslow Rd, Shenton Park
Ph: 08 9381 3088 Fax: 08 9388 2258
ABN: 50 008 917 717
http://www.postnewspapers.com.au/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2011-08-02 01:43:55 Re: Postgres 8.0 upgrade to 9.0
Previous Message Craig Ringer 2011-08-01 23:36:13 Re: Database backup to network folder