Re: problem with recreating database with export

Поиск
Список
Период
Сортировка
От Leif Biberg Kristensen
Тема Re: problem with recreating database with export
Дата
Msg-id 201209272329.04706.leif@solumslekt.org
обсуждение исходный текст
Ответ на Re: problem with recreating database with export  (Dennis Gearon <gearond@sbcglobal.net>)
Список pgsql-general
 Torsdag 27. september 2012 16.55.15 skrev Dennis Gearon :
> <note to future>
> To anyone reading this in the future, if you have problems importing a
> plain text database export, it is usually impossible to do:
> psql -d some_dbase -f the_backup.sql. I don't know why. What works is doing
> 'cd ./the_files_directory', going INTO psql command line, then issuing '\i
> the_backup.sql', and it's really fast. 8 seconds for 128 mbyte file.
>
> PS,do this as user 'postgres' on the system.
> </note to future>

FWIW, here are a few relevant lines from my reload.sh script, which I have
been using since version 7.4, and which is working perfectly:

    dropdb $DB
    createdb --encoding=UNICODE $DB
    psql -U postgres -d $DB -f $INFILE > restore.log 2>&1

Note that I'm running this as a regular postgres user, whose only privilege is
to create new databases.

regards, Leif


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: problem with recreating database with export
Следующее
От: Ondrej Ivanič
Дата:
Сообщение: Re: PostgreSQL, OLAP, and Large Clusters