Обсуждение: Upgrade Process

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

Upgrade Process

От
Rich Shepard
Дата:
   Unlike my previous upgrade from the 7.4.x series to the 8.1.x series, I
now have all data in /var/lib/pgsql/data. Currently running 8.1.4 on my
Slackware system and want to upgrade to 8.2.4, so I'm checking my procedure
before inadvertently creating major problems for myself.

   What I believe should work -- and I'd like conformation or corrections,
please -- is the following:

   1) Run 'pg_dumpall > pg8.1.4.sql' as user postgres.
   2) Stop the running postmaster as root.
   3) Upgrade the Slackware package to 8.2.4 as root.
   4) Restart the postmaster as root.
   5) Run 'psql -f pg8.1.4.sql postgres' as user postgres.

   Have I missed a critical step? The upgrade will replace the existing files
with the new ones in the same directories.

TIA,

Rich

--
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.        |          Accelerator(TM)
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

Re: Upgrade Process

От
Adrian Klaver
Дата:
On Thursday 26 April 2007 9:47 am, Rich Shepard wrote:
>    Unlike my previous upgrade from the 7.4.x series to the 8.1.x series, I
> now have all data in /var/lib/pgsql/data. Currently running 8.1.4 on my
> Slackware system and want to upgrade to 8.2.4, so I'm checking my procedure
> before inadvertently creating major problems for myself.
>
>    What I believe should work -- and I'd like conformation or corrections,
> please -- is the following:
>
>    1) Run 'pg_dumpall > pg8.1.4.sql' as user postgres.

Generally it is a better idea to dump the old version with the new versions
pg_dump,pg_dumpall commands. The new versions know more about the old
versions of the database than the other way around.

>    2) Stop the running postmaster as root.
>    3) Upgrade the Slackware package to 8.2.4 as root.
>    4) Restart the postmaster as root.
>    5) Run 'psql -f pg8.1.4.sql postgres' as user postgres.
>
>    Have I missed a critical step? The upgrade will replace the existing
> files with the new ones in the same directories.
>
> TIA,
>
> Rich
I generally copy the old version(while it is shutdown) to another directory
and then install the new version. I modify the postgresql.conf in the
directory containing the old version so that Postgres listens on a different
port and start it up.  I can then use the pg_dump(all) commands from the new
version to pull from the old version. The catch is that you need enough room
for both copies of the database.

--
Adrian Klaver
aklaver@comcast.net

Re: Upgrade Process

От
Rich Shepard
Дата:
On Thu, 26 Apr 2007, Adrian Klaver wrote:

> Generally it is a better idea to dump the old version with the new
> versions pg_dump,pg_dumpall commands. The new versions know more about the
> old versions of the database than the other way around.

Hi, Adrian!

   I wondered about this.

> I generally copy the old version (while it is shutdown) to another
> directory and then install the new version. I modify the postgresql.conf
> in the directory containing the old version so that Postgres listens on a
> different port and start it up. I can then use the pg_dump(all) commands
> from the new version to pull from the old version. The catch is that you
> need enough room for both copies of the database.

   OK. I'll do this.

Thanks,

Rich

--
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.        |          Accelerator(TM)
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863