Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8FC60476967 for ; Wed, 11 Sep 2002 17:50:10 -0400 (EDT) Received: from smtp013.mail.yahoo.com (smtp013.mail.yahoo.com [216.136.173.57]) by postgresql.org (Postfix) with SMTP id CFF60476839 for ; Wed, 11 Sep 2002 17:50:09 -0400 (EDT) Received: from unknown (HELO internn80ka8rc) (shakiro2@63.230.25.194 with login) by smtp.mail.vip.sc5.yahoo.com with SMTP; 11 Sep 2002 21:50:11 -0000 From: "Curtis Mortensen" To: Subject: Re: pg_restore error Date: Wed, 11 Sep 2002 15:51:51 -0600 Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0008_01C259AB.2512E470" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/80 X-Sequence-Number: 4708 This is a multi-part message in MIME format. ------=_NextPart_000_0008_01C259AB.2512E470 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In case anyone else was following my problem and wanted to know how to resolve it, I'll post what the solution was... I had a bunch of '/connect user' commands in my dump file causing the ident authentication errors. I took those out and the plpgsql stuff that I didn't need in the dump, and that restored everything fine to a new database, except that none of my web applications could get in. That was when i realized that I'd left out the authorization stuff in pg_hba.conf. When I added that, everything worked great. -----Original Message----- From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org]On Behalf Of Curtis Mortensen Sent: Monday, September 09, 2002 3:55 PM To: pgsql-novice@postgresql.org Subject: Re: [NOVICE] pg_restore error I finally got a chance to try out your suggestions, but it seems that something I'm doing is still wrong. When I try the first method described below, I get this error: You are now connected as new user postgres. ERROR: function plpgsql_call_handler already exists with same argument types ERROR: Language plpgsql already exists \connect: FATAL 1: IDENT authentication failed for user "cmortensen" When I try the other method, I get this error: pg_restore: [archiver (db)] could not execute query: ERROR: function plpgsql_call_handler already exists with same argument types I get the impression that the problem is deeper than just trying to backup, but being a very green novice to Postgres, I'm not sure where to start tracking the problem to its source... Thanks for all your help so far :) -------- Original Message -------- Hi Curtis, > thanks for the advice. i now have a different error. :( I suspected you would, but without knowing the commands you were using decided guessing would only be confusing! Only the archive formats from pg_dump are intended to be used with pg_restore. The default output can be restored by psql: $ pg_dump fubar > fubar.sql $ createdb fubar2 CREATE DATABASE $ psql fubar2 < fubar.sql You are now connected as new user giles. CREATE $ $ pg_dump --format=c fubar > fubar.dump $ createdb fubar2 CREATE DATABASE $ pg_restore --dbname=fubar2 < fubar.dump pg_restore: [archiver] WARNING: Data restoration may fail because existing triggers cannot be disabled (no superuser user name specified). This is only a problem when restoring into a database with already existing triggers. $ Regards, Giles ------=_NextPart_000_0008_01C259AB.2512E470 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

In case anyone else was following my problem and wanted t= o know=20 how to resolve it, I'll post what the solution was...

I had a bun= ch of=20 '/connect user' commands in my dump file causing the ident authentication= =20 errors.  I took those out and the plpgsql stuff that I didn't need in = the=20 dump, and that restored everything fine to a new database, except that none= of=20 my web applications could get in.  That was when i realized that I'd l= eft=20 out the authorization stuff in pg_hba.conf.  When I added that, everyt= hing=20 worked great.

-----Original Message-----
From:=20 pgsql-novice-owner@postgresql.org=20 [mailto:pgsql-novice-owner@postgresql.org]On Behalf Of Curtis=20 Mortensen
Sent: Monday, September 09, 2002 3:55 PM
To:=20 pgsql-novice@postgresql.org
Subject: Re: [NOVICE] pg_restore=20 error

I=20 finally got a chance to try out your suggestions, but it seems that somet= hing=20 I'm doing is still wrong.
 
When=20 I try the first method described below, I get this error:
 
You=20 are now connected as new user postgres.
ERROR:  function=20 plpgsql_call_handler already exists with same argument types
ERROR:&nb= sp;=20 Language plpgsql already exists
\connect: FATAL 1:  IDENT=20 authentication failed for user "cmortensen"
 
When=20 I try the other method, I get this error:
 
pg_restore: [archiver (db)] could not execute = query:=20 ERROR:  function plpgsql_call_handler already exists with same argum= ent=20 types
 
I=20 get the impression that the problem is deeper than just trying to backup,= but=20 being a very green novice to Postgres, I'm not sure where to start tracki= ng=20 the problem to its source...
 
Thanks for all your help so far=20 :)
-------- Original Messa= ge=20 --------
Hi Curtis,

> thanks for the advice.  i now have a different error. :(

I suspected you would, but without knowing the commands you were using
decided guessing would only be confusing!  Only the archive formats
from pg_dump are intended to be used with pg_restore.  The default
output can be restored by psql:

$ pg_dump fubar > fubar.sql
$ createdb fubar2
CREATE DATABASE
$ psql fubar2 < fubar.sql
You are now connected as new user giles.
CREATE
$

$ pg_dump --format=3Dc fubar > fubar.dump
$ createdb fubar2
CREATE DATABASE
$ pg_restore --dbname=3Dfubar2 < fubar.dump
pg_restore: [archiver] WARNING:
  Data restoration may fail because existing triggers cannot be disabled
  (no superuser user name specified).  This is only a problem when
  restoring into a database with already existing triggers.
$

Regards,

Giles

------=_NextPart_000_0008_01C259AB.2512E470--