Обсуждение: BUG #4924: pg_restore hangs, does nothing

Поиск
Список
Период
Сортировка

BUG #4924: pg_restore hangs, does nothing

От
"Jim Michaels"
Дата:
The following bug has been logged online:

Bug reference:      4924
Logged by:          Jim Michaels
Email address:      jmichae3@yahoo.com
PostgreSQL version: 8.4.0
Operating system:   Windows XP Pro SP3
Description:        pg_restore hangs, does nothing
Details:

I am on Windows XP Pro SP3.

1. could somebody rewrite pg_dumpall and pg_dump so that it makes editable
dumps?
programmer's text editors can't handle more than 2000 characters per line.
and I want to be able to edit my dumps.

2. pg_restore doesn't seem to do anything but hang when I try to restore.
I did a pg_dumpall from 8.3.7:
pg_dumpall --file=c:\pg-jmichae3-7-13-2009.sql --role=postgres
--host=localhost --port=5432

then I did a pg_restore to 8.4:
pg_restore --file=c:\pg-jmichae3-7-13-2009.sql --role=postgres --verbose
--host=localhost --port=5432

and it printed nothing.  it just sat there with the cursor blinking.  I
expected a lot of output.
there is binary data in blobs I think.
I don't know why this is.  but can you fix it?

the workaround is to use psql.  it works.
I have some log files, but I am not sure which ones to look at, because I
didn't think to look at the logs after the lockups, and my database is
restored now.

the database consists of part of the geoip database and the size of the log
is 144MB, so I can't post it here.
how would you like to proceed?
I have a web site I posted the sql file (10MB) and my un-verbose logs
(200MB) on, and I have a few gig of space left:
http://JesusnJim.com/z/pg-jmichae3-7-13-2009.sql
http://JesusnJim.com/z/logs.zip

does the windows enterprisedb one-click installer allow you to change the
install location?
If it does, I can probably reproduce with verbose logs.
Jim Michaels <jmichae3@yahoo.com>

Re: BUG #4924: pg_restore hangs, does nothing

От
Tom Lane
Дата:
"Jim Michaels" <jmichae3@yahoo.com> writes:
> 2. pg_restore doesn't seem to do anything but hang when I try to restore.
> I did a pg_dumpall from 8.3.7:
> pg_dumpall --file=c:\pg-jmichae3-7-13-2009.sql --role=postgres
> --host=localhost --port=5432

> then I did a pg_restore to 8.4:
> pg_restore --file=c:\pg-jmichae3-7-13-2009.sql --role=postgres --verbose
> --host=localhost --port=5432

--file is the output argument for pg_restore, not the input argument.
It's trying to read the archive from stdin, so it's waiting for you
to type something.

In any case, pg_restore is the wrong tool for restoring pg_dumpall
output.  You should just feed the script to psql.

            regards, tom lane