I don't know, and I'm not able to reproduce this anymore since my mailbox is no longer big enough. If anyone can create a reproduceable test case, I'll bring it to the PostgreSQL mailing list (I hang out there alot).

Matt


Aaron Stone wrote:
Sure is. Big sigh of relief on the table definition. Now what might be
causing the sum() to be only 4 signed bytes if all of the columns
involved are 8 bytes!?

Aaron

On Sun, 2007-02-18 at 21:44 -0500, Matthew T. O'Connor wrote:
I'm not sure what the problem is, but I don't think that's it.

INT8 (or bigint) is an 8 byte integer in PG sql hence 64 bit number, so I don't think that's the problem.


Aaron Stone wrote:
PostgreSQL assigns the type of SUM to be the type of the column it is
aggregating over. Physmessage.messagesize is INT8, so there we go: we're
only getting a 32 bit signed value as the sum.

I'll add an appropriate type cast to the sql fragments in db_get_sql for
dbpgsql.c, a dummy in dbmysql.c, and look up how SQLite handles this
data type issue.

There are actually five places in db.c where a sum is taken over
physmessage.messagesize, but I think the only negative effect is to
disable quota checks on mailboxes above 2GB.

Aaron

On Thu, 2007-02-15 at 23:54 -0800, Aaron Stone wrote:
http://www.linuxforums.org/forum/linux-programming-scripting/54312-postgresql-sum-overflow-error.html

You're on PostgreSQL, right? I wonder if someone has narrowed this
report down to either a bug or a subtlty of the column type?

Aaron

On Thu, 2007-02-15 at 13:21 -0500, Matthew T. O'Connor wrote:
Unfortunately in the interim I have deleted a lot of messages from my account and now after I run dbmail-util the curmail_size value is again positive. I assume this is because I now have less than 2G in the matthew account. So I do think there is an issue here somewhere, sorry I'm not able to help more at the moment.

Matt


Paul J Stevens wrote:
Running 'dbmail-util -py' at trace_level=5 should reveal what's going on
here.

Aaron Stone wrote:
On Mon, 2007-02-12 at 00:29 -0500, Matthew T. O'Connor wrote:
I was looking at dbmail_users today and noticed this:

 user_idnr |             userid             | curmail_size
-----------+--------------------------------+--------------
         4 | matthew                        |  -1886517308
That's interesting (to say the least :-P). Internally we've got a u64_t;
I wonder if that's just coming into DBMail as a high 64 bit number or if
something is really screwed up.

Aaron

_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

        
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

Reply via email to