Thread: Postgres 8.0 upgrade to 9.0

Postgres 8.0 upgrade to 9.0

From
Atul Goel
Date:

 

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

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

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

4)      Any other suggestions.

 

Regards,

Atul Goel



The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Group Holdings plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Authorised and regulated by the Financial Services Authority. FSA Register number 114059.

Re: Postgres 8.0 upgrade to 9.0

From
Hannes Erven
Date:
Atul,


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

Yes, at least if you use BLOB types. The 9.0 server sends them in a
format former JDBC drivers cannot understand:
http://www.postgresql.org/docs/9.0/static/runtime-config-client.html#GUC-BYTEA-OUTPUT

Other than that I did not experience issues, but the application I
support was upgraded from only 8.3 to 9.0 (and is running now on 9.0 for
many months flawlessly).


Best regards,

    -hannes

Re: Postgres 8.0 upgrade to 9.0

From
Craig Ringer
Date:
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/