[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Interesting side-effect of upgrading to postgres 7.2.1
After I upgraded postgres from 7.1.2 to 7.2.1, a rather interesting bug
raised it's head - the checkout page randomly stopped working.
It was logging the following errors:
<ip,date, and other stuff> Route log failed.
<ip,date, and other stuff> ERRORS on ORDER EDOS0000218:
> Error during creation of order routing log:
> Route log failed. at /usr/local/interchange/lib/Vend/Order.pm line
1574.
I traced this to where the transaction is logged - lines 48-98 in
etc/log_transaction:
[import table=transactions type=LINE continue=NOTES]
...
[/import]
Postgres logs the following error:
ERROR: value too long for type character varying(12)
Specifically, it was failing when a inserted value was larger than the
field size in the transactions table. On inspection, I found the old
Postgres behaviour was to truncate any value too large for the field.
Now it correctly (one might argue otherwise) spits the dummy.
Yes, I know this is a Postgres and ic developer / data integrity issue,
but thought it was worth a mention as I have now heard of other
Postgres-based apps also crashing due to lack of data-integrity
enforcement... :-)
Cheers,
--
Andrew McBeath
System Admin / Senior Developer
Zeald Ltd
ICQ: 53879543
Ph: +64 9 4157575
Mob: +64 21 434104
-------
Maybe in order to understand mankind, we have to look at the
word itself: "Mankind".
Basically, it's made up of two separate words - "mank" and "ind".
What do these words mean?
It's a mystery, and that's why so is mankind.
Jack Handy
-------