Re: Help with pg_restore

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Help with pg_restore
Дата
Msg-id 6219.1061475097@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Help with pg_restore  ("dan" <dan@webfolks.us>)
Список pgsql-admin
"dan" <dan@webfolks.us> writes:
> I created the data directory, then ran initdb to do the intial setup. I next
> ran:
> cat file1 file2 file3 | pg_restore --clean --create
> It churned for a while and generated a lot of output (file1 and file 2 are
> just over a gigabyte each, and file3 is about 300 MB). But when I ran psql,
> none of the tables had been created. What am I doing wrong?

After some digging in the CVS logs, I came across this post-7.1 fix:

2001-10-23 17:26  tgl

    * src/bin/pg_dump/pg_backup_archiver.c: Forbid the switch
    combination --clean --create, which is pointless (why bother
    dropping individual objects in a just-created database?) as well as
    dangerous (as the code stands, the drops will be issued in the
    wrong database, namely the one you were originally connected to).

which might or might not explain your difficulty.  What I'm currently
suspecting is that pg_restore did restore, but not into the database you
expected it to (I think it would have created a new database of the
original DB name, and restored into that).

            regards, tom lane

В списке pgsql-admin по дате отправления:

Предыдущее
От: "mathan"
Дата:
Сообщение: Re: Starting PostgreSQL 7.3.4 with Webmin on Mandrake 9.1
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump does not dump index, constraints, sequences