Re: Problems while restoring databases

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jean-Yves NOLEN" <jynolen(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Problems while restoring databases
Date: 2011-12-12 16:11:19
Message-ID: 19696.1323706279@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Jean-Yves NOLEN" <jynolen(at)gmail(dot)com> writes:
> [ while restoring a pg_dump backup ]
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 626; 2612 16386 PROCEDURAL
> LANGUAGE plpgsql postgres
> pg_restore: [archiver (db)] could not execute query: ERREUR: language
> "plpgsql" already exists

Probably the reason you get this is that you have plpgsql installed in
template1, and so it's already there in your destination database.
You can avoid that by cloning the new database from template0
(add "TEMPLATE template0" to your CREATE DATABASE command).

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Paul Rogers 2011-12-12 19:40:05 Pg-restore Only Privileges/ACL?
Previous Message Jean-Yves NOLEN 2011-12-12 11:32:10 Problems while restoring databases