Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id CD8567D8411 for ; Mon, 12 Dec 2011 12:11:34 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ra8TV-0002xl-Al for pgsql-admin@postgresql.org; Mon, 12 Dec 2011 16:11:34 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id pBCGBJ5V019697; Mon, 12 Dec 2011 11:11:19 -0500 (EST) To: "Jean-Yves NOLEN" cc: pgsql-admin@postgresql.org Subject: Re: Problems while restoring databases In-reply-to: <00ff01ccb8c1$b19f2e60$14dd8b20$@gmail.com> References: <00ff01ccb8c1$b19f2e60$14dd8b20$@gmail.com> Comments: In-reply-to "Jean-Yves NOLEN" message dated "Mon, 12 Dec 2011 12:32:10 +0100" Date: Mon, 12 Dec 2011 11:11:19 -0500 Message-ID: <19696.1323706279@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201112/64 X-Sequence-Number: 38822 "Jean-Yves NOLEN" 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