Errors regarding transporting database using pg_dump

From: Chun-fan Ivan Liao <ivan(at)ivangelion(dot)tw>
To: pgsql-general(at)postgresql(dot)org
Subject: Errors regarding transporting database using pg_dump
Date: 2009-10-05 10:07:44
Message-ID: 173f52ec0910050307j1662d6e1jb95fd04f12e15720@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2009-10-05 10:27:22 Re: Procedure for feature requests?
Previous Message Thom Brown 2009-10-05 09:48:25 Re: Postgres won't start. Nothing in the log.