Обсуждение: pg_dump fail beacuse of oid larger than int32

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

pg_dump fail beacuse of oid larger than int32

От
"Ragnar Garli"
Дата:
Hi all

I have a problem with pg_dump du to oid values larger than signed 32 bit
int.

I run a 7.1.3 on debian potato.

Th database is not big (about 10G) but with a lot of delete and insert.
The thing that crashes it all is when the pg_dump tries to select from
pg_description with a large oid value.
Then the backend in some stage calls dtoi4, wich have a return type of
int32, and this fails.

I think I can modify my 7.1.3 to dump the bases so i can upgrade to 7.3.1,
but I don't know if I will get the same problewm back in a few months.

I dont use the oids on the tables, so i can create the tables on the
7.3.1 with the "without oids" parameter, but will this really save me
from the system oid incrementing.
I did a test on a 7.2.1, creating a table without oids.
I then insertet 10 rows, and the created a new table.
the oid in pg_class had increasedf by twenty some between those two
tables.. why?

so it all comes down to two little questions:
Q1: Is there an easy way to get dump the data from my 7.1.3 ?
Q2: How can I minimalize oid incrementation ?
Regards:
Ragnar Garli

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus


Re: pg_dump fail beacuse of oid larger than int32

От
Tom Lane
Дата:
"Ragnar Garli" <ragnar_garli@hotmail.com> writes:
> I have a problem with pg_dump du to oid values larger than signed 32 bit
> int.

Use a more recent pg_dump.  7.3.1's pg_dump should be able to talk to
your 7.1.3 server and extract the data without problems.

            regards, tom lane

Re: pg_dump fail beacuse of oid larger than int32

От
"Ragnar Garli"
Дата:
>From: Tom Lane <tgl@sss.pgh.pa.us>
>To: "Ragnar Garli" <ragnar_garli@hotmail.com>
>CC: pgsql-general@postgresql.org
>Subject: Re: [GENERAL] pg_dump fail beacuse of oid larger than int32 Date:
>Tue, 14 Jan 2003 10:50:03 -0500
>
>"Ragnar Garli" <ragnar_garli@hotmail.com> writes:
> > I have a problem with pg_dump du to oid values larger than signed 32 bit
> > int.
>
>Use a more recent pg_dump.  7.3.1's pg_dump should be able to talk to
>your 7.1.3 server and extract the data without problems.
>
>            regards, tom lane
Sorry, but pg_dump from 7.3.1 fails too. The problem is the errormessage it
gets from the backend when pg_dump scans throug the pg_description table
using the oids for the tables in the database.

Just look at the d2 debug output from the postmaster:
DEBUG:  StartTransactionCommand
DEBUG:  query: SELECT description FROM pg_description WHERE objoid =
2325712020
ERROR:  dtoi4: integer out of range
DEBUG:  AbortCurrentTransaction

when this comes throug pg_dump it looks like:
postgres@bravo4:~/7_3_1_binaries$ pg_dumpall >outfile
DumpComment: SELECT failed: 'ERROR:  dtoi4: integer too large
'.
pg_dump failed on combi00001, exiting

The original error message was "integer out of range", but somwhere along
the way, somebody advised me to split the test in too small and too large.

Regards:
Ragnar Garli




_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail


Re: pg_dump fail beacuse of oid larger than int32

От
Tom Lane
Дата:
"Ragnar Garli" <ragnar_garli@hotmail.com> writes:
>> Use a more recent pg_dump.  7.3.1's pg_dump should be able to talk to
>> your 7.1.3 server and extract the data without problems.

> Sorry, but pg_dump from 7.3.1 fails too. The problem is the errormessage it
> gets from the backend when pg_dump scans throug the pg_description table
> using the oids for the tables in the database.

> Just look at the d2 debug output from the postmaster:
> DEBUG:  StartTransactionCommand
> DEBUG:  query: SELECT description FROM pg_description WHERE objoid =
> 2325712020

This is not 7.3.1 pg_dump: you can look at the sources for yourself.
Against a 7.1 server it will do

        appendPQExpBuffer(query, "SELECT description FROM pg_description WHERE objoid = '%s'::oid", oid);

I suggest double-checking your PATH.  You must be invoking the wrong
pg_dump.

            regards, tom lane

Re: pg_dump fail beacuse of oid larger than int32

От
"Ragnar Garli"
Дата:
<cut>

> > DEBUG:  query: SELECT description FROM pg_description WHERE objoid =
> > 2325712020
>
>This is not 7.3.1 pg_dump: you can look at the sources for yourself.
>Against a 7.1 server it will do
>
>        appendPQExpBuffer(query, "SELECT description FROM pg_description WHERE
>objoid = '%s'::oid", oid);
>
>I suggest double-checking your PATH.  You must be invoking the wrong
>pg_dump.
>
Oops. *blush*
Backing up bases now :)

Thanks!

Regards:
Ragnar Garli


_________________________________________________________________
MSN 8: advanced junk mail protection and 2 months FREE*.
http://join.msn.com/?page=features/junkmail