Re: Postgres 8.0 upgrade to 9.0 - Mailing list pgsql-general

From Craig Ringer
Subject Re: Postgres 8.0 upgrade to 9.0
Date
Msg-id 4E3739E5.3070204@postnewspapers.com.au
Whole thread Raw
In response to Postgres 8.0 upgrade to 9.0  (Atul Goel <Atul.Goel@iggroup.com>)
List 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/

pgsql-general by date:

Previous
From: "Reuven M. Lerner"
Date:
Subject: Re: Pending trigger events on ALTER TABLE in 8.3
Next
From: Craig Ringer
Date:
Subject: Re: Database backup to network folder