Re: pg_restore issue

Поиск
Список
Период
Сортировка
От Leonardo M. Ramé
Тема Re: pg_restore issue
Дата
Msg-id 20140212194602.GD6171@leonardo-laptop
обсуждение исходный текст
Ответ на Re: pg_restore issue  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On 2014-02-12 14:04:41 -0500, Tom Lane wrote:
> Leonardo =?iso-8859-1?Q?M=2E_Ram=E9?= <l.rame@griensu.com> writes:
> > On 2014-02-12 13:30:52 -0500, Tom Lane wrote:
> >> The -c switch causes pg_restore to try to DROP every object it's about to
> >> restore.  If you're restoring into an empty database then this is useless,
> >> and in fact will not work if you're also using --exit-on-error.  Remove
> >> one or the other switch.
>
> > Tom, I've dropped the db, then createdb again, then removed the -c
> > option, now I get this error:
>
> > pg_restore: [archiver (db)] Error while PROCESSING TOC:
> > pg_restore: [archiver (db)] Error from TOC entry 735; 2612 213488
> > PROCEDURAL LANGUAGE plpgsql postgres
> > pg_restore: [archiver (db)] could not execute query: ERROR:  language
> > "plpgsql" already exists
> >     Command was: CREATE PROCEDURAL LANGUAGE plpgsql;
>
> pg_dump versions more recent than 8.4 use "CREATE OR REPLACE PROCEDURAL
> LANGUAGE" to work around the possibility that plpgsql is preinstalled.
> If you don't want to use a modern pg_dump, you'll need to not use
> --exit-on-error.
>
> In general, it's recommended to use the newer pg_dump when trying to
> transfer data from an older installation to a newer one.  You can
> generally make it work without that, but it's not necessarily going
> to be seamless, and one of the ways it tends to not be seamless is
> that you have to be willing to ignore harmless errors.
>

Ok, I understand your reasoning. Removing -c and --exit-on-error fixed
the issue.

BTW, I've used --exit-on-error because there were many errors, and I wanted
to fix each one of them.

Regards,
--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_restore issue
Следующее
От: alexandros_e
Дата:
Сообщение: Pg_trgm and "invalid invalid byte sequence for encoding UTF8"