Thread: Can't reload dump

Can't reload dump

From
TimothyReaves@westfieldgrp.com
Date:
     Hello all.  I'm using postgresql 7.2 under cygwin.  And I have a
problem.

     I created a dump file, dropped the database, and created a new
database, and tried to reload the dump file.  It didn't work.  It gets so
far and stops, with:
CREATE
CREATE
\connect: server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

     I create the database as user Administrator, and the dump the
reconnects as user treaves (from my unix boxes) to create the tables and
such.  I have tracked down the problem to the following lines in the dump
file that add support for plpgsql.  In this case, I'm not yet using
plpgsql, so it is not big deal, but this is a bug none the less, isn't it?
When I comment the three lines out (the connect & two create) the dump
loads fine.

 \connect - Administrator

--
-- TOC Entry ID 65 (OID 16787)
--
-- Name: "plpgsql_call_handler" () Type: FUNCTION Owner: Administrator
--

 CREATE FUNCTION "plpgsql_call_handler" () RETURNS opaque AS
'$libdir/plpgsql', 'plpgsql_call_handler' LANGUAGE 'C';

--
-- TOC Entry ID 66 (OID 16788)
--
-- Name: plpgsql Type: PROCEDURAL LANGUAGE Owner:
--

 CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER
"plpgsql_call_handler" LANCOMPILER '';



Re: Can't reload dump

From
"Tim Finch, FosterFinch Ltd"
Date:
I'm no expert but you could use the command line createlang to simulate the
language creation part of the loading in the dump file..?
Tim

At 09:37 13/03/2002 -0500, TimothyReaves@westfieldgrp.com wrote:
>      Hello all.  I'm using postgresql 7.2 under cygwin.  And I have a
>problem.
>
>      I created a dump file, dropped the database, and created a new
>database, and tried to reload the dump file.  It didn't work.  It gets so
>far and stops, with:
>CREATE
>CREATE
>\connect: server closed the connection unexpectedly
>         This probably means the server terminated abnormally
>         before or while processing the request.
>
>      I create the database as user Administrator, and the dump the
>reconnects as user treaves (from my unix boxes) to create the tables and
>such.  I have tracked down the problem to the following lines in the dump
>file that add support for plpgsql.  In this case, I'm not yet using
>plpgsql, so it is not big deal, but this is a bug none the less, isn't it?
>When I comment the three lines out (the connect & two create) the dump
>loads fine.
>
>  \connect - Administrator
>
>--
>-- TOC Entry ID 65 (OID 16787)
>--
>-- Name: "plpgsql_call_handler" () Type: FUNCTION Owner: Administrator
>--
>
>  CREATE FUNCTION "plpgsql_call_handler" () RETURNS opaque AS
>'$libdir/plpgsql', 'plpgsql_call_handler' LANGUAGE 'C';
>
>--
>-- TOC Entry ID 66 (OID 16788)
>--
>-- Name: plpgsql Type: PROCEDURAL LANGUAGE Owner:
>--
>
>  CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER
>"plpgsql_call_handler" LANCOMPILER '';
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Tim Finch,
FosterFinch Ltd
http://www.fosterfinch.co.uk