Re: Postgresql upgrade from 8.4 to latest

From: Oleksii Kliukin <alexk(at)hintbits(dot)com>
To: AI Rumman <rummandba(at)gmail(dot)com>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgresql upgrade from 8.4 to latest
Date: 2015-07-28 21:16:32
Message-ID: CAAS3tyKntWSKUsYS7Z=_pTzjyTsURFz=gj9RPYGdfp=D_X_U9A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jul 28, 2015 at 10:35 PM, AI Rumman <rummandba(at)gmail(dot)com> wrote:
> But what I read, in-place upgrade has smaller outage, compared to
> dump/restore.

Please, keep in mind that while the direct outage (when the database
is shut down) is small, there will be a time period right after the
upgrade when PostgreSQL will be rebuilding statistics. Until it's
rebuilt, the planner won't be able to generate decent plans (because
there will be no statistics to use, since that is cleared after the
upgrade), hence, your application might run so slow that it won't be a
big improvement over the time when the DB is shut down. The only way
to find out how long it would take in your environment and for your
dataset is to test.

But so many articles on having bugs afterwards.
> Do you think it is a good idea to use pg_upgrade for critical database
> application?

Yes.

> Or any other tool should I consider? For example - slony?

I think if you can afford the downtime pg_upgrade would be the easiest
solution. You can use Slony, Londiste, Bucardo or any other
replication solution, but they require a complex setup and restrict
you to only a subset of operations possible on the database
(basically, only those that can activate a trigger) until all of your
data is replicated.

For really small databases (up tot tens/hunderds of megabytes)
dump/restore can be faster than pg_upgrade. Make sure you use the
pg_dump/pg_restore from 9.4 and not 8.4

Kind regards,
--
Oleksii

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2015-07-28 22:13:16 Re: Postgresql upgrade from 8.4 to latest
Previous Message John R Pierce 2015-07-28 20:57:11 Re: Postgresql upgrade from 8.4 to latest