Monday 2 November 2026, just after four in the afternoon, India time. Clickpost's order creation API started returning server errors. Not for every order. Orders for 91 carriers went through as normal. Orders for every other carrier failed with HTTP 5xx errors, the code a server sends when something has gone wrong on its side.
That split was the first clue, and it is the detail that makes this incident worth sitting with. Two services doing the same job, one failing, one fine. The difference between them was not load, not traffic, and not a bad deploy. It was a single column in a table nobody used any more, holding a number that had quietly run out of room.
What broke
Clickpost creates orders through two services. A newer one, written in Kotlin, handles 91 carriers. An older one, written in Python, handles v3 order creation for all the other carriers. After an order is created, a post-processing step does follow-up work, and it used to write a log row into a dedicated logging table, recording the ID of a related record.
That logging table had been deprecated in a February 2026 release. Deprecated, in plain terms, means the team had decided to stop using it. But deprecating a table and removing every write to it are two different jobs, and only one of them got done. The code that wrote to the table was removed from the Kotlin path, and left in the Python path.
Meanwhile, the IDs being copied into the logging table kept growing. The related records they came from use IDs with no 32-bit limit. The logging column did have a limit. It was a 32-bit signed integer.
A number with a ceiling
A 32-bit signed integer is a whole number stored in 32 binary digits, with one digit reserved for the sign, positive or negative. That leaves 31 digits for the size of the number, so the largest value it can hold is 2,147,483,647. One more than that, and it does not fit. There is no rounding, no overflow into a bigger type. The database simply refuses the write.
At about 16:08 IST on 2 November, a newly created related record got an ID above 2,147,483,647. The database rejected the log write. And because that write ran synchronously, inside the same request as the order itself, the rejection failed the whole order. Synchronous means the order request waited for the log write to finish before it could answer. The logging step was not essential to the order. It was a note in a table nobody read any more. But because it ran in line, its failure became the order's failure.
Every order on the Python path got the same treatment. Orders for the 91 carriers on the Kotlin service, which no longer called the legacy logging code at all, went through.
Monitoring flagged the rise in 5xx errors within a minute. Comparing the two services showed that only the Python side was failing, which pointed the team at the legacy write. They disabled it, and order creation was restored at 17:02 IST. Fifty-four minutes, start to finish.
The check that could not see it
Here is the part that should worry you, because Clickpost did have an overflow monitor. Most organisations with a large database already watch for integer columns approaching their limit. Clickpost watched for it too. The problem was which columns it watched.
In Clickpost's own words from the root cause analysis, published on 3 November: "Our integer capacity checks covered only primary key and foreign key columns." A primary key is the column that identifies each row in a table. A foreign key is a column that holds another table's ID and is formally declared as a reference to it. The column that broke stored another table's ID, but it was never declared as a foreign key, so the check never looked at it.
That is an easy list to build, which is why it is so common. Primary and foreign keys are written down in the database catalog, the database's own record of its schema. A short query reads them out. On a well-modelled schema, that list finds the columns people usually think of as IDs. But the check is only as good as the schema's declarations. Without a declared constraint, a column holding another table's ID looks like any other integer column.
And the columns most likely to lack a declared foreign key are the ones in the least-maintained parts of a database. Logging and audit tables often leave foreign keys out on purpose, because a constraint on a high-volume append table costs write performance and blocks deleting the parent rows. Columns added in a hurry leave them out by accident. Tables on their way out get no new constraints and no new reviews. Clickpost's column sat in two of those places at once: a logging table holding a reference without a constraint, in a table already marked deprecated.
The column also gave no warning of its own. Between February and November, the only change to the logging table was that the numbers in it got larger. A monitor built from declarations had no reason to notice.
Two more gaps behind the same failure
Clickpost's report names three contributing factors, and the monitoring gap is only one of them.
The first is incomplete decommissioning. The table was marked deprecated in February, but the code writing to it was removed from only one of the two order creation paths. There was no check confirming that all writes to the table had stopped. A label that says "not in use" is a claim, and claims need evidence. In this case the evidence would have been simple: no writes to the table for some period, or a search of the code for every writer.
The second is logging in the critical path. The critical path is the chain of steps a request must complete before it can answer. Anything on it can fail the request. A log write is not part of making an order, so it should never have been able to stop one. Had the write been asynchronous, fired off in the background while the order carried on, the overflow would have cost a log row, not an order. Had the decommissioning been complete, the write would have been gone months before the IDs reached the ceiling.
The audit you can run this week
The fix Clickpost chose starts with selecting columns by what they hold, not by what they are declared as. You can run the same audit on your own database in an afternoon. The idea is simple: list every integer column, read its current maximum, and compare it with the limit of its type.
Start with the list. In Postgres, the catalog query looks like this:
SELECT table_name, column_name, data_type
FROM information_schema.columns
WHERE data_type IN ('smallint', 'integer', 'bigint');
That gives you every integer column, declared keys or not. Then, for each one, find the maximum value it holds and work out how close that is to the ceiling of its type. A small Python script does the arithmetic:
LIMITS = {
"smallint": 32_767,
"integer": 2_147_483_647,
"bigint": 9_223_372_036_854_775_807,
}
def usage_percent(max_value, column_type):
return 100 * max_value / LIMITS[column_type]
# flag anything past 80 percent of its limit
for column, max_value, column_type in audit_results:
used = usage_percent(max_value, column_type)
if used > 80:
print(f"{column}: {used:.1f}% of its {column_type} limit")
On a very large table, the maximum can come from statistics or a sample rather than a full scan, as long as a column whose maximum is climbing fast still gets flagged well before it reaches the ceiling. The point is not a perfect measurement. The point is that every integer column is in scope, including the ones with no declared key.
The boundary test is worth writing down, because it is the test Clickpost's monitor could never have run. For a 32-bit signed integer column, check three values: one below the limit, one at it, and one above it.
// illustrative: a guard before an insert, not Clickpost's code
if id > math.MaxInt32 {
return fmt.Errorf("id %d exceeds the 32-bit limit %d", id, math.MaxInt32)
}
2,147,483,646 fits. 2,147,483,647 fits, just barely. 2,147,483,648 does not fit, and the database will refuse it. If your code has no guard like this, the first time you learn about the ceiling is the day an order fails.
What Clickpost changed
Every contributing factor got at least one corrective action, so the same failure cannot recur through any of the three gaps. Every integer column that stores IDs or user-supplied values is to be found, monitored, and widened to 64 bits where possible, so the limit no longer applies. A logging failure can no longer fail an order creation request. And a table cannot be marked deprecated while any code still writes to it.
Those three actions are a good template, and they are cheap compared with 54 minutes of failed orders. The audit is the one to do first, because it is the one that finds problems you do not know you have. A decommissioning check only covers tables you already know about. A logging fix only covers writes you already know are synchronous. The column audit covers the whole schema, including the tables nobody has looked at since February.
So here is the question to take into your next week. If your overflow monitor builds its list from key constraints, how many integer columns in your schema hold IDs and have no declared constraint at all? Those are the columns your alerting cannot see. In Clickpost's case, one of them passed 2,147,483,647 in November, in a table that had been deprecated since February. When did you last check yours?
Top comments (2)
The decommissioning action is the one I'd turn into a measurement, because "no code still writes to this table" is hard to prove by reading two codebases and easy to prove from the database. On Postgres, pg_stat_user_tables keeps a running n_tup_ins count per table. Read it on the day the table is marked deprecated and again a week later. If the number moved, something still writes, and Clickpost would have known that in February, nine months before the IDs reached the ceiling.
I'd then make the final step of deprecation a REVOKE INSERT on that table from the application role, done on a day the team picks with someone watching. If a writer was missed, it fails during a change you can undo with one GRANT, not at 16:08 on an ordinary Monday when a counter crosses 2,147,483,647. That also catches writers in services nobody thought to search.
That pg_stat_user_tables check is the part I wish I'd spelled out. Two reads a week apart would have settled it in February, and the REVOKE INSERT turns a quiet assumption into a loud failure on a day you choose.