Skip to content
DevMeme
7106 of 7590
Databases Post #7791 · source on Telegram

Iranian Rial Collapse Overflows Database Column, Breaks Startup Jobs

Description

A screenshot of an X.com post by Marc Köhlbrugge (@marckohlbrugge, verified, yellow cartoon avatar with a 'WIP' cap) reading: 'A bunch of background jobs for Startup Jobs started failing... Turns out it was caused by the collapse of the Iranian Rial which lead to the exchange rate exceeding 1,000,000 and overflowing a database column' with a sweat-smile emoji. Attached is a 5-year currency chart (tabs 1D, 5D, 1M, 1Y, 5Y, Max) showing the Rial's value hovering around 0.00002 from 2023 through 2025 before plunging vertically to nearly 0.00000 at the far right, ending in a red dot. A real-world postmortem gem: geopolitical macroeconomics manifesting as a numeric overflow in a column sized on the assumption that exchange rates stay below one million

Comments

23
Anonymous ★ Top Pick Somewhere a 2015 code review approved DECIMAL(8,2) with the comment 'no currency will ever need more' - geopolitics just filed the regression
  1. Anonymous ★ Top Pick

    Somewhere a 2015 code review approved DECIMAL(8,2) with the comment 'no currency will ever need more' - geopolitics just filed the regression

  2. Anonymous

    Turns out the column width was the application's entire geopolitical risk model.

  3. @RiedleroD 5mo

    …collapse? I struggle to believe that story is actually true

    1. @RiedleroD 5mo

      like ok it dropped from 70 to 64 over the last month, but that's hardly what's being suggested by the guy's screenshot

  4. @RiedleroD 5mo

    wait nvm he was in the 5Y view

    1. @RiedleroD 5mo

      there's certainly something real funky going on though. this doesn't feel quite right

      1. @RiedleroD 5mo

        other way around shows this, which I also find dubious

        1. @RiedleroD 5mo

          the only mildly relevant thing I could find is that they're introducing a "new rial" that is just the same one except 4 zeroes less. similar thing as with old and new polish złoty: same currency, you just make the number smaller for less tedium. I would expect this to, if any at all, produce the opposite effect of what we're seeing though. wikipedia mentions the iranian protests being caused by inflation (an eyewatering 40%) but says nothing about the rial falling off a cliff, which leads me to believe google is just wrong about this

          1. @RiedleroD 5mo

            I can find several sources claiming that december through january the year-to-year inflation was between 45% and 60%. eyewatering, terrible, incredible. but not the cliff google would lead you to believe. so I believe what happened was that google (or whatever google's source is) just doesn't have the data and frankly, made that shit up. and that's what messed with mr. money's database

            1. @RiedleroD 5mo

              original tweet: https://xcancel.com/marckohlbrugge/status/2028236228970099180 oh and about "exceeding 1 million" - that happened in early 2025, not recently. *maybe* it was 2²⁰, which is 1,048,576 but I doubt that it took almost a year to go from 1M to 1.04M considering the 40% inflation rate, and 20 is a weirdly arbitrary number of bits to have. 24 would be more understandable, or 23 if we're doing signed integers (why though)

              1. @NaNmber 5mo

                holy research 🤯

              2. @SamsonovAnton 5mo

                Remember crude oil prices going negative in 2020? That's why. 👌

                1. @RiedleroD 5mo

                  no? what?

                  1. @deadgnom32 5mo

                    during covid oil consumption has extremely reduced in extremely short time. while millions of barrels were still on their way to destination points. countries just had no idea where to store it and they had no chance to consume that much before oil arrival, so that created a unique phenomenon, when mathematicaly supply was so much higher than demand, that prices went negative.

                    1. @deadgnom32 5mo

                      but it was only a math phenomenon, as actual cosumer you still had to pay for it.

                      1. @FreeNickname 5mo

                        Not really, if I recall correctly? One note is that that's wasn't crude oil price per se. That was crude oil futures price. And yes, you could "buy" it for a negative price. And you would get paid to have it. The catch is that you wouls actually legally have to accept that crude oil delivery. Like physically accept it and store it somewhere. And if you don't, you'd get fined A LOT.

                        1. @deadgnom32 5mo

                          yes. I meant exactly this as a basic consumer you still had to pay for it, but if you can store a whole tanker somewhere, that is where the negative price comes.

                          1. @FreeNickname 5mo

                            Ah, I see. Then we're talking about the same thing 🤝 It's just that to me "basic consumer" of crude oil IS the one who buys it, since usual people don't buy crude oil 🙂 So, from my point of view, "basic consumers of crude oil" could, in fact, "buy" it for a negative price 🙂

                            1. @deadgnom32 5mo

                              yes it was just. that many people thought — nice. I can take a couple of barrels and sell it afterwards. no, you need to take the whole tanker and as a basic consumer if you would like to buy a couple — the storage owner won't pay you for that. he will sell it to you for money if you somehow manage to talk them into selling it to you

                        2. @deadgnom32 5mo

                          I may have failed to express myself correctly. I'm very tired lately

                    2. @deadgnom32 5mo

                      basically, oil prices are mostly automatically computed, formulae just weren't designed for situations like this, since supply usually quickly adjusts to demand changes, it has never been expected to have such an extreme drop

                    3. @RiedleroD 5mo

                      dang. crazy

              3. @TERASKULL 5mo

                based xcancel user

Use J and K for navigation