powered by simpleCommunicator - 2.0.60     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / PostgreSQL [игнор отключен] [закрыт для гостей] / Восстановление резервной копии
2 сообщений из 2, страница 1 из 1
Восстановление резервной копии
    #33122827
Shiko_1
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
PostgreSQL 8.0 (под Windows).
При попытке восстановления базы данных из резервной копии (с помощью pgAdmin III) база данных восстанавливается, но при этом в логах ...


pg_restore: creating PROCEDURAL LANGUAGE plpgsql
pg_restore: [archiver (db)] Error from TOC entry 403; 16402 17232 PROCEDURAL LANGUAGE plpgsql
pg_restore: [archiver (db)] could not execute query: ERROR: language "plpgsql" already exists
Command was: CREATE TRUSTED PROCEDURAL LANGUAGE plpgsql HANDLER

plpgsql_call_handler VALIDATOR plpgsql_validator;
pg_restore: creating FUNCTION gtsvector_in(cstring)
pg_restore: [archiver (db)] Error from TOC entry 98; 1255 17421 FUNCTION gtsvector_in(cstring) postgres
pg_restore: [archiver (db)] could not execute query: ERROR: user "postgres" does not exist
Command was: ALTER FUNCTION public.gtsvector_in(cstring) OWNER TO postgres;

****
pg_restore: ERROR: function "dex_init(text)" does not exist
CONTEXT: COPY pg_ts_dict, line 1, column dict_init: "dex_init(text)"
pg_restore: [archiver (db)] error returned by PQendcopy
pg_restore: *** aborted because of error

Process returned exit code 1.

При этом база восстанавливается и работает. Но почему при восстановлении PostgreSQL ругается?
...
Рейтинг: 0 / 0
Восстановление резервной копии
    #33123325
landy
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Читаем в доке:
The text files created by pg_dump are intended to be read in by the psql program. The general command form to restore a dump is

psql dbname < infile

where infile is what you used as outfile for the pg_dump command. The database dbname will not be created by this command, you must create it yourself from template0 before executing psql (e.g., with createdb -T template0 dbname). psql supports options similar to pg_dump for controlling the database server location and the user name. See psql's reference page for more information.
...
Important : The dumps produced by pg_dump are relative to template0. This means that any languages, procedures, etc. added to template1 will also be dumped by pg_dump. As a result, when restoring, if you are using a customized template1, you must create the empty database from template0, as in the example above.
...
...
Рейтинг: 0 / 0
2 сообщений из 2, страница 1 из 1
Форумы / PostgreSQL [игнор отключен] [закрыт для гостей] / Восстановление резервной копии
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]