Errors regarding transporting database using pg_dump - Mailing list pgsql-general

From Chun-fan Ivan Liao
Subject Errors regarding transporting database using pg_dump
Date
Msg-id 173f52ec0910050307j1662d6e1jb95fd04f12e15720@mail.gmail.com
Whole thread Raw
Responses Re: Errors regarding transporting database using pg_dump
Re: Errors regarding transporting database using pg_dump
List pgsql-general
I want to transport the database server to a new machine.

The OS and the PostgreSQL version of the old machine: FreeBSD 6.1-RELEASE & psql 8.1.3
And that of the new machine: FreeBSD 7.2-RELEASE & psql 8.4.0
(Using  "uname -a"  "psql -U pgsql" to check the version)

I used pg_dump to dump the old database out and psql to store the database into the new server, but the following two errors occurred:

ERROR:  incompatible library "/lib/libc.so.6": missing magic block
HINT:  Extension libraries are required to use the PG_MODULE_MAGIC macro.
STATEMENT:  CREATE FUNCTION "system"(cstring) RETURNS integer
            AS '/lib/libc.so.7', 'system'
            LANGUAGE c STRICT;
ERROR:  function public.system(cstring) does not exist
STATEMENT:  ALTER FUNCTION public."system"(cstring) OWNER TO pgsql;
ERROR:  value too long for type character varying(12)
CONTEXT:  COPY stulist, line 46803, column STU_CNAME: "鷓埥(9debacdd)砆"
STATEMENT:  COPY stulist ("COURSE_SN", "S_YEAR", "S_TERM", "COU_CODE", "CLASS", "REG_NO", "DPT_CODE", "DPT_SCNAME", "YEAR", "CREDIT", "COU_CNAME", "TEA_CODE", "TEA_CNAME", "STU_CNAME", "SCORE", "SCORE_A", "SERNO", "PANOPA", "UNIT", "TEMP") FROM stdin;

The previous error was it could not find /lib/libc.so.6, so I installed the port misc/compat6x and copy the libc.so.6 to /lib. If I replaced libc.so.6 with libc.so.7, the same error occured.

I've did some googling. Should I insert the line
PG_MODULE_MAGIC;
into the libc source code and recompile it? But I don't know where the code resides and what the command is.....

The above is about the first error, and for the second one I totally have no idea. Could somebody please help me out?

Thanks in advance.


pgsql-general by date:

Previous
From: agostonbejo
Date:
Subject: Re: How to have ant's task insert special chars appropriately?
Next
From: Martin Gainty
Date:
Subject: Re: Postgres won't start. Nothing in the log.