Re: SOLVED: help! - how to get postgres 7.3 back
On Saturday 10 January 2004 01:08, Oliver Elphick wrote:
[...snipped: details of stupidly upgrading postgres
without first doing pg_dumpall, causing need to
downgrade from 7.4 to 7.3 temporarily...]
> Use --force-depends and --force-conflicts.
Just in case it helps the anyone else as absent minded as me, this is
what I did, following Oliver's advice:
mkdir ~/postgres_temp ; save database
cp -R /var/lib/postgres/data ~/postgres_temp/ ; just in case...
dpkg --force-conflicts --force downgrade --force-depends -i *.deb
rm -R /var/lib/postgres/dumpall/7.3 ; actually I moved it
; being ultracautious.
/etc/init.d/postgresql start ; Monique suggested
; using invoke-rc.d
; but it silently
; did nothing
> /var/lib/postgres/dumpall/7.3/db.out ; dunno why pg_dumpall
; isn't on path
Then used aptitude to update and manually selected 7.4 in each
of postgresql and postgresql-client. I expected it to do this
automatically, but it didn't. That installed 7.4 and the postinstall
successfully upgraded the database. I didn't have to manually load the
While doing that, I was checking the man page and found that,
apparently, I could have avoided the whole operation by using
'pg_dumpall -i' - it says this ignores version mismatch. Obviously, I
haven't tried it, but it should be the easier way to upgrade the
database. I'll have to try it next time I mess up...