Re: Backup & Restore a database in PostgreSQL

Поиск
Список
Период
Сортировка
От Greg Williamson
Тема Re: Backup & Restore a database in PostgreSQL
Дата
Msg-id 1312797740.51629.YahooMailNeo@web46112.mail.sp1.yahoo.com
обсуждение исходный текст
Ответ на Re: Backup & Restore a database in PostgreSQL  (Siva Palanisamy <siva_p@hcl.com>)
Список pgsql-general
Siva --


>
> Thanks a lot for your reply. As usual Backup worked perfectly. When I tried restore using the command you provided, I
gotthe below list of errors! Please help me > out on this. 
>
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 14; 1255 16384 FUNCTION plpgsql_call_handler() postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  must be owner of function public.plpgsql_call_handler
>     Command was: DROP FUNCTION public.plpgsql_call_handler();

Clue #1 -- you are not running as the correct user for the restore into this database.

> pg_restore: [archiver (db)] Error from TOC entry 276; 2612 16387 PROCEDURAL LANGUAGE plpgsql
> pg_restore: [archiver (db)] could not execute query: ERROR:  must be superuser to drop procedural language
>     Command was: DROP PROCEDURAL LANGUAGE plpgsql;

Clue #2!

So you need to change to being the postgres user that created the database, which presumably has the proper permissions
todrop these various entities. 

<snipped redundant error messages?

HTH,

Greg Williamson


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: How to get to know the current user account is superuser or not?
Следующее
От: Achilleas Mantzios
Дата:
Сообщение: Re: How to get to know the current user account is superuser or not?