[wellylug] 'postgresql-dump' confusion

Cliff Pratt enkidu at cliffp.com
Sat May 21 10:52:52 NZST 2005


Adam Bogacki wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi, I'm having a problem getting Postgresql working properly.
> There seem to be two problems.  The postmaster is not working and
> the database is in an older format that cannot be read by
> version 7.4 of PostgreSQL.I have read the 'README.Debian.migration'
> file but am still confused. I tried apt-removing the older version
> and apt-reinstalling with no difference.
> 
> When running 'postgresql-dump' I get the following
> 
> 
>>Tux:/root$ psql postgresql-dump -- d
>>psql: could not connect to server: 8\uffff+@\uffff\uffff&@
>>Is the server running locally and accepting
>>connections on Unix domain socket
>>"/var/run/postgresql/.s.PGSQL.5432"?
>>Tux:/root$
> 
> 
> Also,
> 
> 
>>Tux:/etc/postgresql# /etc/init.d/postgresql start
>>Starting PostgreSQL database server: postmaster(FAILED)
>>ERROR: The database is in an older format that cannot be read by
>>version 7.4 of PostgreSQL.
>>
>>Run postgresql-dump to dump the old database and to reload
>>it in the new format.
>>*** READ /usr/share/doc/postgresql/README.Debian.migration.gz FIRST! ***
>>
>>The version 7.4 postmaster cannot be started until
>>this is done.
> 
> When I try to get into postgres I get asked for a password, but as I
> have not yet set up or configured it, there isn't one.
> 
> 
>>Tux:/root$ su postgres
>>Password:
> 
> 
> I'm aware this is a fairly common procedure but I'm floundering
> around, the night is late, I'm trying to RTFM, and other priorities call.
> 
> Can anyone point me in the right direction ?
>
The man page of pg_dump says:

  -i
  --ignore-version
               Ignore version mismatch between pg_dump and 
the database server. pg_dump can handle databases from 
previous  releases  of  PostgreSQL,  but  very  old versions 
are not supported anymore (currently prior to 7.0).  Use 
this option if you need  to  override the  version  check 
(and  if  pg_dump then fails, don't say you weren't warned).

I'd pg_dump all the old databases, wipe them (remove 
/var/lib/postgres/data I think), and reload them from the 
pg_dumps. But you probably figured it out by now...

Cheers,

Cliff




More information about the wellylug mailing list