Thread

  1. Re: 7.0 -> 7.2 Migration (oops)

    Neil Conway <neilc@samurai.com> — 2002-09-27T13:43:02Z

    Glen Baker <postgres@coakley-baker.com> writes:
    > Since 7.2.1 databases are not compatible with 7.0, I can no longer
    > start up postres.
    > 
    > Is there any way that I can migrate the databases after the fact?
    
    Yeah, you'll need to install a 7.0 postmaster, start it up, get a dump
    of the DB, and then load that into the 7.2 postmaster.
    
    Cheers,
    
    Neil
    
    -- 
    Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC
    
    
    
  2. 7.0 -> 7.2 Migration (oops)

    Glen Baker <postgres@coakley-baker.com> — 2002-09-27T13:46:44Z

    Whups...I just upgraded my linux system from Redhat 7.1 to 7.3. As a part of 
    that upgrade my postgres installation was also upgraded from 7.0 to 7.2.1.
    
    Since 7.2.1 databases are not compatible with 7.0, I can no longer start up 
    postres.
    
    Is there any way that I can migrate the databases after the fact? Had I 
    realized this was going to happen I would have dumped them beforehand, but 
    it's a bit late now..
    
    Am I just plain hosed?
    
    Thanks,
    
    ..glen
    
    
  3. Re: 7.0 -> 7.2 Migration (oops)

    Lamar Owen <lamar.owen@wgcr.org> — 2002-09-27T20:15:31Z

    On Friday 27 September 2002 09:46 am, Glen Baker wrote:
    > Whups...I just upgraded my linux system from Redhat 7.1 to 7.3. As a part
    > of that upgrade my postgres installation was also upgraded from 7.0 to
    > 7.2.1.
    
    > Is there any way that I can migrate the databases after the fact? Had I
    > realized this was going to happen I would have dumped them beforehand, but
    > it's a bit late now..
    
    It's mentioned in the Red Hat 7.3 release notes.
    
    Anyway, that doesn't help you.  You _might_ be able to reinstall your 
    PostgreSQL 7.0 RPM's from your Red Hat 7.1 install media.  Get all the 
    postgresql rpm's you have installed off the install media, and put them 
    somewhere (I use /root/install as a holding bin for updated and downgraded 
    RPMs) and make sure those are the only RPMs in that directory.
    
    Now, you can try:
    rpm -Uvh --nodeps --oldpackage postgresql*.rpm
    
    and see what happens.  It _should_ work, even though you will get warnings.
    
    Restart postmaster (/sbin/service postgresql start), dump, stop postmaster, 
    then rpm -Uvh to the PostgreSQL RPMs you got with Red Hat 7.3.  Then move 
    your old data tree somewhere else, and start the new postmaster.  You should 
    be able to restore into it, although some hand-editing of the dumpfile may be 
    required.
    
    And next time read the release notes... :-)  Anyway, I certainly feel your 
    pain -- I got caught the same way between Red Hat 5.0 and Red Hat 5.1.
    -- 
    Lamar Owen
    WGCR Internet Radio
    1 Peter 4:11
    
    
  4. Re: 7.0 -> 7.2 Migration (oops)

    Jeff Davis <list-pgsql-general@empires.org> — 2002-09-27T20:52:10Z

    It seems as though it would be easiest to work outside of the package system 
    at this point, unless your not really familiar with compiling/installing 
    software from source. Supplying --no-deps to rpm seems dangerous to me, 
    although perhaps Lamar's directions are known to be safe enough.
    
    Download postgres 7.0 source, compile & install it in it's own new directory 
    (so that it doesn't clutter up your system later) and on it's own port. Point 
    the postmaster to the old "PGDATA" directory and do pg_dump. After you've got 
    the dump, shut the 7.0 postmaster down, move the old PGDATA directory to some 
    backup location (just in case), and create an empty directory in place of the 
    PGDATA you just moved. Then, initdb (with 7.2) the empty directory and 
    pg_restore.
    
    Regards,
    	Jeff Davis
    
    On Friday 27 September 2002 01:15 pm, Lamar Owen wrote:
    > On Friday 27 September 2002 09:46 am, Glen Baker wrote:
    > > Whups...I just upgraded my linux system from Redhat 7.1 to 7.3. As a part
    > > of that upgrade my postgres installation was also upgraded from 7.0 to
    > > 7.2.1.
    > >
    > > Is there any way that I can migrate the databases after the fact? Had I
    > > realized this was going to happen I would have dumped them beforehand,
    > > but it's a bit late now..
    >
    > It's mentioned in the Red Hat 7.3 release notes.
    >
    > Anyway, that doesn't help you.  You _might_ be able to reinstall your
    > PostgreSQL 7.0 RPM's from your Red Hat 7.1 install media.  Get all the
    > postgresql rpm's you have installed off the install media, and put them
    > somewhere (I use /root/install as a holding bin for updated and downgraded
    > RPMs) and make sure those are the only RPMs in that directory.
    >
    > Now, you can try:
    > rpm -Uvh --nodeps --oldpackage postgresql*.rpm
    >
    > and see what happens.  It _should_ work, even though you will get warnings.
    >
    > Restart postmaster (/sbin/service postgresql start), dump, stop postmaster,
    > then rpm -Uvh to the PostgreSQL RPMs you got with Red Hat 7.3.  Then move
    > your old data tree somewhere else, and start the new postmaster.  You
    > should be able to restore into it, although some hand-editing of the
    > dumpfile may be required.
    >
    > And next time read the release notes... :-)  Anyway, I certainly feel your
    > pain -- I got caught the same way between Red Hat 5.0 and Red Hat 5.1.
    
    
    
  5. Re: 7.0 -> 7.2 Migration (oops)

    Tom Lane <tgl@sss.pgh.pa.us> — 2002-09-27T21:12:10Z

    Jeff Davis <list-pgsql-general@empires.org> writes:
    > Supplying --no-deps to rpm seems dangerous to me, 
    > although perhaps Lamar's directions are known to be safe enough.
    
    > Download postgres 7.0 source, compile & install it in it's own new directory 
    > (so that it doesn't clutter up your system later) and on it's own
    > port.
    
    I like Jeff's approach better too.  One caveat: you need to configure
    your build with the same options as the RPM build you were using,
    especially --enable-locale and --enable-multibyte if the RPM used them
    (which I believe it does).
    
    			regards, tom lane
    
    
  6. Re: 7.0 -> 7.2 Migration (oops)

    Lamar Owen <lamar.owen@wgcr.org> — 2002-09-27T21:20:00Z

    On Friday 27 September 2002 05:12 pm, Tom Lane wrote:
    > Jeff Davis <list-pgsql-general@empires.org> writes:
    > > Supplying --no-deps to rpm seems dangerous to me,
    > > although perhaps Lamar's directions are known to be safe enough.
    
    > > Download postgres 7.0 source, compile & install it in it's own new
    > > directory (so that it doesn't clutter up your system later) and on it's
    > > own port.
    
    > I like Jeff's approach better too.  One caveat: you need to configure
    > your build with the same options as the RPM build you were using,
    > especially --enable-locale and --enable-multibyte if the RPM used them
    > (which I believe it does).
    
    Better yet, wait a few minutes.  I'm building a 7.0.3 RPMset for Red Hat 7.3 
    to upload to ftp.postgresql.org.  I'll do up a 7.1.3 too.  Dependencies and 
    configure options will be properly set.
    -- 
    Lamar Owen
    WGCR Internet Radio
    1 Peter 4:11
    
    
  7. Re: 7.0 -> 7.2 Migration (oops)

    Lamar Owen <lamar.owen@wgcr.org> — 2002-09-27T21:31:49Z

    On Friday 27 September 2002 04:52 pm, Jeff Davis wrote:
    > It seems as though it would be easiest to work outside of the package
    > system at this point, unless your not really familiar with
    > compiling/installing software from source. Supplying --no-deps to rpm seems
    > dangerous to me, although perhaps Lamar's directions are known to be safe
    > enough.
    
    All the --no-deps is going to do in this case is override the dependencies.  
    As long as the binary RPM to be installed is from a binary-compatible release 
    of Red Hat (same major version number) it _should_ work OK.  If it works 
    without --no-deps that's OK too.  But --oldpackage is required.
    
    > Download postgres 7.0 source, compile & install it in it's own new
    > directory (so that it doesn't clutter up your system later) and on it's own
    > port. Point the postmaster to the old "PGDATA" directory and do pg_dump.
    > After you've got the dump, shut the 7.0 postmaster down, move the old
    > PGDATA directory to some backup location (just in case), and create an
    > empty directory in place of the PGDATA you just moved. Then, initdb (with
    > 7.2) the empty directory and pg_restore.
    
    Using this procedure, one must be careful.  The RPM installation's binaries 
    are in /usr/bin -- the PATH would have to be set to get the from-source 
    install's binaries first.  ISTM the rpm way is substantially easier, as RPM 
    makes sure you won't accidentally execute the wrong binaries.
    
    The easiest would be a binary seamless upgrade..... :-)
    
    I would have recommended using the semiautomatic upgrade procedure, but, at 
    Red Hat 7.3 that capability was yanked from Red Hat's RPM set, since it 
    didn't work reliably enough.
    
    If the rpm install with --nodeps doesn't work, one can always download the 
    source RPM at do a rpm --rebuild on it, producing freshly compiled binary 
    RPMs built for Red Hat 7.3.
    
    Hmmm..... ok, I was going to build a set of 7.0.3 RPMs quickly, but the 7.0.3 
    build stumbles over the version of readline in Red Hat 7.3.  So a rebuild 
    from source will also have problems.  I'm looking at a possibility, though.  
    I'm also looking at building a 7.1.3 set for Red Hat 7.3, and hopefully the 
    readline issue won't haunt me.
    -- 
    Lamar Owen
    WGCR Internet Radio
    1 Peter 4:11
    
    
  8. Re: 7.0 -> 7.2 Migration (oops)

    Lamar Owen <lamar.owen@wgcr.org> — 2002-09-27T21:57:23Z

    On Friday 27 September 2002 05:20 pm, Lamar Owen wrote:
    > Better yet, wait a few minutes.  I'm building a 7.0.3 RPMset for Red Hat
    > 7.3 to upload to ftp.postgresql.org.  I'll do up a 7.1.3 too.  Dependencies
    > and configure options will be properly set.
    
    While the 7.0.3 build didn't, the 7.1.3 build did.  So, see 
    ftp.postgresql.org/pub/binary/v7.1.3/redhat-7.3 for fresh PostgreSQL 7.1.3 
    binary RPM's for Red Hat 7.3.
    -- 
    Lamar Owen
    WGCR Internet Radio
    1 Peter 4:11
    
    
  9. Re: 7.0 -> 7.2 Migration (oops)

    Glen Baker <postgres@coakley-baker.com> — 2002-09-28T03:42:05Z

    Thanks for all the responses. I rather suspected that the answer was going 
    to be to re-install 7.0 but thought I would check here first. Now I'll get 
    down to the work of uininstall/reinstall/uninstall/reinstall/etc.
    
    Fortunately I didn't have anything truly important on this machine so I can 
    write this off as a learning experiance.
    
    Oh, and as to the fact that this was in the 7.3 release notes...what...read 
    the instructions? Heck if I ever did that my VCR would have stopped 
    blinking 12:00 years ago!
    
    ..glen
    
    
  10. Re: 7.0 -> 7.2 Migration (oops)

    Yury Bokhoncovich <byg@center-f1.ru> — 2002-10-01T07:27:27Z

    Hello!
    
    On Fri, 27 Sep 2002, Lamar Owen wrote:
    
    > On Friday 27 September 2002 09:46 am, Glen Baker wrote:
    > > Whups...I just upgraded my linux system from Redhat 7.1 to 7.3. As a part
    > > of that upgrade my postgres installation was also upgraded from 7.0 to
    > > 7.2.1.
    > 
    > > Is there any way that I can migrate the databases after the fact? Had I
    > > realized this was going to happen I would have dumped them beforehand, but
    > > it's a bit late now..
    > 
    > It's mentioned in the Red Hat 7.3 release notes.
    > 
    > Anyway, that doesn't help you.  You _might_ be able to reinstall your 
    > PostgreSQL 7.0 RPM's from your Red Hat 7.1 install media.  Get all the 
    
    BTW, there is no need in this. It is enough to get just postmaster from 
    RPM. Easiest method is thru MC :-):
     just click to old PG RPM, select usr/bin, then copy postmaster and 
    pg_dumpall to your home directory.
    Start old postmaster, then run pg_dumpall >somefile, stop postmaster (just 
    do killall postmaster). That's all.
    You'd start the new PG and do psql -f somefile...
    
    -- 
    WBR, Yury Bokhoncovich, Senior System Administrator, NOC of F1 Group.
    Phone: +7 (3832) 106228, ext.140, E-mail: byg@center-f1.ru.
    Unix is like a wigwam -- no Gates, no Windows, and an Apache inside.