Re: (A) native Windows port

From: Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
To: Hannu Krosing <hannu(at)tm(dot)ee>, Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
Cc: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, HACKERS <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: (A) native Windows port
Date: 2002-07-09 17:10:10
Message-ID: 200207091310.10353.lamar.owen@wgcr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Tuesday 09 July 2002 01:46 pm, Hannu Krosing wrote:
> On Tue, 2002-07-09 at 18:30, Oliver Elphick wrote:
> > The main problem is getting access to the user data after an upgrade.

> Can't it be dumped in pre-upgrade script ?

The pre-upgrade script is run in an environment that isn't robust enough to
handle that. What if you run out of disk space during the dump? What if a
postmaster is running -- and many people stop their postmaster before
upgrading their version of PostgreSQL?

Besides, at least in the case of the RPM, during OS upgrade time the %pre
scriptlet (the one you allude to) isn't running in a system with all the
normal tools available. Nor is there a postmaster running. Due to a largish
RAMdisk, a postmaster running might cause all manners of problems.

And an error in the scriptlet could potentially cause the OS upgrade to abort
in midstream -- not a nice thing to do to users, having a package during
upgrade abort their OS upgrade when it is a little over half through, and in
an unbootable state.... No, any dumping of data cannot happen during the %pre
script -- too many issues there.

> IMHO, if rpm and apt can't run a pre-install script before deleting the
> old binaries they are going to replace/upgrade then you should complain
> to authors of rpm and apt.

Oh, so it's RPM's and APT's problem that we require so many resources during
upgrade.... :-)

> The right order should of course be

> 1) run pre-upgrade (pg_dumpall >dumpfile)
> 2) upgrade
> 3) run post-upgrade (initdb; psql < dumpfile)

All but the first step works fine. The first step is impossible in the
environment in which the %pre script runs.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2002-07-09 17:15:43 Re: Serious Crash last Friday
Previous Message Marc G. Fournier 2002-07-09 17:09:23 Re: I am being interviewed by OReilly

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2002-07-09 17:27:37 Re: Issues Outstanding for Point In Time Recovery (PITR)
Previous Message Marc G. Fournier 2002-07-09 17:09:23 Re: I am being interviewed by OReilly