maxint reached? 
Author Message
 maxint reached?

Has anyone seen this:

ERROR:  dtoi4: integer out of range

on 7.1.3

What worries me, is that at startup time, the log shows:

DEBUG:  database system was shut down at 2002-04-02 23:16:52 EEST
DEBUG:  CheckPoint record at (82, 1928435208)
DEBUG:  Redo record at (82, 1928435208); Undo record at (0, 0); Shutdown TRUE
DEBUG:  NextTransactionId: 517528628; NextOid: 2148849196
DEBUG:  database system is in production state

Note the NextOid, while i /usr/include/machine/limits.h defines INT_MAX as
2147483647. Are oid really singed ints?

Daniel

PS: This database indeed has an increasing oid counter in that range. Grep
from the log shows

DEBUG:  NextTransactionId: 386003914; NextOid: 1551075952
DEBUG:  NextTransactionId: 397667914; NextOid: 1643984428
DEBUG:  NextTransactionId: 444453748; NextOid: 1864857132
DEBUG:  NextTransactionId: 450233305; NextOid: 1888540204
DEBUG:  NextTransactionId: 454987662; NextOid: 1917687340
DEBUG:  NextTransactionId: 501775621; NextOid: 2078209580
DEBUG:  NextTransactionId: 517524499; NextOid: 2148849196
DEBUG:  NextTransactionId: 517528628; NextOid: 2148849196

this is from one month ago.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command



Sun, 19 Sep 2004 04:26:19 GMT
 maxint reached?

An followup to my previous post.

It turned out to be an query containing "oid = somenumber" called from perl script. Is it possible that the default type conversion functions do not work as expected?

Changing this to "oid = oid(somenumber)" worked as expected.

Daniel

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Sun, 19 Sep 2004 04:45:10 GMT
 maxint reached?

Quote:

> It turned out to be an query containing "oid = somenumber" called from perl script. Is it possible that the default type conversion functions do not work as expected?

No, but you do have to cast an oversize value to oid explicitly to
prevent it from being taken as int4, eg

regression=# select oid = 2444444444 from int4_tbl;
ERROR:  dtoi4: integer out of range
regression=# select oid = 2444444444::oid from int4_tbl;
<< works >>

(In releases before about 7.1 you'd have had to single-quote the
literal, too.)

This is one of a whole raft of cases involving undesirable assignment
of types to numeric constants; see past complaints about int4 being used
where int2 or int8 was wanted, numeric vs float8 constants, etc etc.
We're still looking for a promotion rule that does what you want every
time...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------



Sun, 19 Sep 2004 05:08:13 GMT
 maxint reached?

Quote:

> So in essence this means that my best bet is to again dump/reload the
> database...

Either that or fix your queries to cast the literals explicitly.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Sun, 19 Sep 2004 05:18:48 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. In dynamic Sql, , I reach the varchar limit is 8000 characters

2. In dynamic Sql, , I reach the varchar limit is 8000 characters

3. The maximum limit for connections has been reached

4. Maximum connection limit has been reached

5. DB suspect, can't reach physic .dat-file

6. Updates not reaching Subscriber

7. HELP!! -SS2000 Devel - Max number of connections reached

8. Reaching columns -in C#.net- in queries with multiple tables with the same column name

9. index size limitation reached

10. help:resource limit reached for recordsets

11. maximum limit for connections has been reached ??!!?

12. RAISERROR does not reach client


 
Powered by phpBB® Forum Software