Search Postgresql Archives

Re: Upgrade Problem: 7.4.3 -> 8.1.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rich Shepard <rshepard@xxxxxxxxxxxxxxx> writes:

> On Thu, 19 Jan 2006, Doug McNaught wrote:
>
>> Did you tell pg_restore to read from a file?  Otherwise it will try to read
>> from your terminal, which probably isn't what you want.
>
> Doug,
>
>    No, I didn't. I've no idea where the file was dumped, so I've no idea of
> the name or location. Reading in Douglas*2 PostgreSQL book (pages 872-873),
> they write nothing about giving pg_dumpall a file name/location nor that
> pg_restore needs that information. They do write that pg_restore wants a dump
> produced with -format=c or -format=t, without further explanation.

pg_dumpall writes to standard output, so you should have seen an
enormous spew of data at your terminal.  I'm surprised you didn't.
The manpages in the official Postgres documentation are quite clear
about the behavior of these utilities; your book doesn't seem to be.

The recommended way to do an upgrade (if you compile from source) is:

1) Compile the new version of PG and install it to a different place. 
2) Use the new pg_dump to connect to the old server and dump all the
   databases.
3) Make sure your PATH points to the new binaries (or run them by
   hand), and
4) Run initdb to create a new data directory in a different place fom
   the old one.
5) Stop the old server and start the new one.
5) If you've used pg_dumpall, your backup will be in SQL test format,
   so you feed it to 'psql'
6) If you've done pg_dump --format=c for each database, then you need
   to use pg_restore.  pg_restore is only for the binary format
   dumps.

This preserves the old data and binaries so you can back out if you
need to.  Naturally you need enough disk space for three copies of the
data.

Now, since you're using a distribution's packages and upgrade
procedure, it's not clear what happened to your data.  You might want
to look at the server logfiles (if any) and ask on the Slackware
mailing lists to see if anyone else has had this problem.

-Doug


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux