Обсуждение: Excellent job!

Поиск
Список
Период
Сортировка

Excellent job!

От
Mladen Gogala
Дата:
Despite being a rather conservative DBA, I decided to move one of my
production databases to Postgres 9.0.  I am delighted by the experience!
Not only did the pg_upgrade work perfectly and moved a fairly good sized
database in  the matter of seconds, but the reason for the migration,
the fact that PostgreSQL 0.0 can resolve "IS NOT NULL" conditions by
using an index, proved to be as spectacular as I have expected. The UAT
was scheduled to last until 8 PM today, the users are delighted and have
already signed off. I am having a celebratory Sam Adams. Excellent job!
This is the DB that was moved:

news=> select pg_size_pretty(pg_database_size('news'));
 pg_size_pretty
----------------
 86 GB
(1 row)

It's nothing spectacular, but it isn't small, either! Once again, great
job done by Bruce and the gang.


--
Mladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
www.vmsinfo.com


Re: Excellent job!

От
Mladen Gogala
Дата:
Kasia Tuszynska wrote:
> Mladen,
> You used pg_upgrade to migrate to 9.0?
> I ,perhaps mistakenly, assumed that it is for use once the db is at 9.0 to migrate in the future.
> Kasia
>
Yes, I did use pg_uprade. The purpose of pg_upgrade is to migrate from
the earlier releases to PgSQL 9.0.  It works flawlessly with 8.4.4.
having in mind the size of the database, I used pg_upgrade --link, which
makes it impossible to re-open the database with the version 8.4.4.
Basically, you define (and export, of course) the following environment
variables:

OLDATADIR, pointing to 8.4.4 $PGDATA, typically ~postgres/data on Red
Hat systems.
OLDBINDIR, the directory where the old 8.4.4 binaries are, typically
/usr/bin on Red Hat systems.
NEWDATADIR, located at ~postgres/9.0/data on Red Hat systems.
NEWBINDIR, located at /usr/pgsql-9.0/bin on Red Hat systems.

After that, pg_upgrade will copy your old database to the new $PGDATA,
unless you specify "--link", in which case it will just create links.
The latter is much faster but much more dangerous. They say that speed
kills, but I had no problems whatsoever. Also, make sure that you have
all of the same languages installed on the new postgresql  9.0 as are
installed on postgres 8.x that you are migrating from. If you have
plperl or plpython on the 8.4 cluster, than you have to install it on
your 9.0 version or the pg_upgrade utility will refuse to cooperate and
will complain about the missing library.

--

Mladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
http://www.vmsinfo.com
The Leader in Integrated Media Intelligence Solutions




Re: Excellent job!

От
Mladen Gogala
Дата:
Mladen Gogala wrote:
> Kasia Tuszynska wrote:
>
>> Mladen,
>> You used pg_upgrade to migrate to 9.0?
>> I ,perhaps mistakenly, assumed that it is for use once the db is at 9.0 to migrate in the future.
>> Kasia
>>
>>
> Yes, I did use pg_uprade. The purpose of pg_upgrade is to migrate from
> the earlier releases to PgSQL 9.0.  It works flawlessly with 8.4.4.
> having in mind the size of the database, I used pg_upgrade --link, which
> makes it impossible to re-open the database with the version 8.4.4.
> Basically, you define (and export, of course) the following environment
> variables:
>
Before you do all that, you have to initialize the new 9.0 cluster with
initdb.

--

Mladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
http://www.vmsinfo.com
The Leader in Integrated Media Intelligence Solutions