Обсуждение: [REPOST] Problem for dumping a 6.5.2 database

Поиск
Список
Период
Сортировка

[REPOST] Problem for dumping a 6.5.2 database

От
"Bruno BAGUETTE"
Дата:
Hello,

I'm trying to dump a PostgreSQL 6.5.2. database table in order to add it
in a PostgreSQL 7.3.3 database but I'm encountering some errors :

When I try to do the dump, I get :

[bouchon@old_db]$ pg_dump -x -v -u -t tablename -D -f tablename_dump.sql
thedatabasename
Username:
Password:

--  last builtin oid is 17120
--  reading user-defined types
--  reading user-defined functions
getFuncs(): SELECT failed.  Explanation from backend: 'pqReadData() --
backend closed the channel unexpectedly.
        This probably means the backend terminated abnormally
        before or while processing the request.
'.


If I connect to this database via psql and I make a \d tablename I get :

[bouchon@old_db]$ psql -u thedatabasename
Username:
Password:

Welcome to the POSTGRESQL interactive sql monitor:
  Please read the file COPYRIGHT for copyright terms of POSTGRESQL
[PostgreSQL 6.5.2 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66]

   type \? for help on slash commands
   type \q to quit
   type \g or terminate with semicolon to execute query
 You are currently connected to the database: thedatabasename

thedatabasename=> \d tablename;
pqReadData() -- backend closed the channel unexpectedly.
        This probably means the backend terminated abnormally
        before or while processing the request. thedatabasename=>

But I can do select * from thetablename where pk_id=10 even select *
from tablename without any problems.

I don't understand why the pg_dump is not working... :-(

Can you help me ?

Thanks in advance !

---------------------------------------
Bruno BAGUETTE - pgsql-ml@baguette.net


Re: [REPOST] Problem for dumping a 6.5.2 database

От
Manuel Sugawara
Дата:
"Bruno BAGUETTE" <pgsql-ml@baguette.net> writes:

> Hello,
>
> I'm trying to dump a PostgreSQL 6.5.2. database table in order to add it
> in a PostgreSQL 7.3.3 database but I'm encountering some errors :

You are using the pg_dump from 7.3 and the lastest version it supports
is 7.0. Try using the 6.5.2 pg_dump and then restore that dump into
the 7.3.3 database.

Regards,
Manuel.

Re: [REPOST] Problem for dumping a 6.5.2 database

От
Tom Lane
Дата:
"Bruno BAGUETTE" <pgsql-ml@baguette.net> writes:
> I'm trying to dump a PostgreSQL 6.5.2. database table in order to add it
> in a PostgreSQL 7.3.3 database but I'm encountering some errors :

> --  reading user-defined functions
> getFuncs(): SELECT failed.  Explanation from backend: 'pqReadData() --
> backend closed the channel unexpectedly.

> thedatabasename=> \d tablename;
> pqReadData() -- backend closed the channel unexpectedly.

Looks to me like you've got some serious problems with corruption of the
system tables :-(

If you can SELECT from the tables you need, I'd suggest dumping out
their contents using COPY commands.  Then you can reload those data
files into a newer database (assuming you remember what the table
schemas were).  6.5.2 is old enough that I don't really remember how
to do any sort of data-recovery work with it...

            regards, tom lane