On Thu, May 25, 2000 at 09:41:16PM +0100, Oliver Elphick wrote: > One problem you will need to fix before running postgresql-dump > is that you need to do `chown postgres.postgres > /usr/lib/postgresql/dumpall'. As installed, it is owned by root, and > postgresql-dump tires to create a file in it.
one other issue is that it restores the data OK, but doesn't restore the users and passwords in pg_shadow. i had to fix this by hand like so: 1. su - postgres 2. cp /usr/lib/postgresql/dumpall/db.out ./users.psql 3. chmod 600 .users.psql 3. vi users.psql 4. delete everything after the "copy pg_shadow from stdin;" ... "\." section. 5. save and exit from vi 6. psql <users.psql one odd thing is that after doing this, all databases and tables were owned by their correct owners...not sure how to interpret this fact - maybe the users are restored correctly, but pg_shadow is accidentally cleared for some reason??? dunno. anyway, it would be good if restoring the users & passwords could be automated as part of the upgrade...maybe by dumping pg_shadow before dumping the databases, and then restoring pg_shadow before restoring the databases. or finding whatever it is that clears pg_shadow (if there is anything) and fixing it. it took me a while to figure out how to fix it, and i completely screwed up the databases on one of my postgres machines at one point. fortunately, i had made a tar.gz backup of /var/postgres/data before starting the upgrade, so i just reverted to 6.5.3-18, restored the data, and repeated the upgrade again...then restored pg_shadow as outlined above. i suspect that most users confronted with this problem wouldn't know what to do and would be left with a broken system if they messed around with it too much. apart from this (really a minor problem...but with the potential to escalate into a serious problem if the user panics), the upgrade went amazingly smoothly. you've done a great job, IMO. BTW, i vaguely recall that the same thing (loss of users & passwords) happened in the upgrade from 6.4 to 6.5. also BTW, i've upgraded 4 machines from 6.5.3 to 7.0 so far, and it has happened on all of them so the fault is definitely reproducible. i've still got a few more to upgrade and i expect the same will happen on them too. craig -- craig sanders -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

