November 25, 2026
November 24, 2026
Meaningful Human-in-the-Loop Checking of GenAI Synthesis for Restricted Languages
When the only comment on a PR is "LGTM", due diligence has not been done. A glance is not understanding. Understanding has levels, and we almost always overestimate ours. But the LGTM stamps the code as correct anyway. Make no mistake (pun intended), this is also true for LLM-generated code, even with so-called "correct-by-construction" approaches.
Why does verification catch anything at all? Because of redundancy. You write the specification carefully and then write the implementation separately, and the verification check finds the places where the two disagree.
LLM code synthesis throws that away. It derives the implementation from the specification, so the two can almost never disagree. Correct-by-construction becomes a dangerous misnomer. If the specification is wrong, the implementation is wrong in exactly the same way. Better models will not fix this. Any move from natural language to a specification leaves an intent gap between what the user meant and what the specification captures. The devil is in the cornercases.
We need to do better than LGTM.
This ECOOP 2026 paper is brought to you by Brown. To resolve ambiguity in LLM-generated specification snippets, the paper introduces PICK, a human-in-the-loop tool that eliminates mismatched candidate formulas by asking users to classify concrete distinguishing scenarios sampled from the candidates' semantic differences. PICK brings the redundancy back in verification checks. Your answers about concrete cases are a second statement of intent, made in a different form than the prose prompt.
The idea
PICK derives not one but four candidate expressions from the user's prose description. It computes where the candidates disagree, and samples concrete scenarios from those regions to show them to the user two at a time, in a this-or-that format. The scenarios they study in the paper are strings for regexes, traces for LTL, and requests for access-control policies. The target is restricted languages for now as the title says. The user accepts or rejects each scenario, and each vote is checked against every candidate. A candidate is eliminated after two downvotes and needs at least one upvote to be selected. This repeats until one or zero candidates remain.
Each classification is checked against every candidate, not just against the one the scenario came from. Accept a scenario and every candidate whose language contains it gets an upvote, while the ones that exclude it get a downvote. One answer updates several candidates at once, and this keeps the number of questions small.
Rejecting is deliberately asymmetric. If you reject a scenario, the candidates that accept it get downvoted, but the candidates that also reject it get nothing. Otherwise a candidate could win by outlasting the others rather than by being chosen. A candidate has to earn at least one upvote to get selected. Ending with zero candidates is a legitimate outcome. It means either the LLM produced nothing correct or the user's intent is inconsistent.
How restricted do these languages need to be? Not very. You need to compute the set difference between two candidates, which means closure under negation and intersection. You need to decide equality, so that candidates with identical meaning can be collapsed before you waste questions on them. And you need to sample concrete instances out of a difference set. Regexes qualify. LTL qualifies, and they use Spot to generate the traces. ABAC (attribute-based access control) qualifies once you bound the entities.
Notably SQL does not as query containment is undecidable. The paper also gives a second reason: A query means nothing without a database, so the object the user has to judge is a query-and-database pair.
The experiments
The regex and ABAC studies had three groups of 50 participants each, recruited through the Prolific platform. Everyone got the same task: here are four candidate expressions, pick the right one.
The groups differ only in what help they get. The control group saw the four candidates and picked one, with no examples. They could also say none was correct, or that they were unsure. The other two groups used PICK and classified scenarios instead of reading formulas. One of those two could see the candidate list while classifying and the other could not. This is how they test whether seeing the formulas helps at all, but this turned out to make no measurable difference.
Regex experiment: On abWords (a/b strings with b in every even position), control got 22% right, versus 60-72% with PICK. The most common wrong answer, chosen by 19 of 50, was ~((a|b)b)+~, which requires even length. On Dates, where no candidate was correct, control got 26% and PICK 66-70%. Of the 13 control participants who said they regularly write regexes, none got both abWords and Dates right.
ABAC experiment: Significant improvement on two of the three policies. PICK users were also 2-4 times more likely to eliminate every candidate, while control users tended to pick a wrong policy that was close to the correct one. I think this is the right behavior. A subtly wrong policy may go unnoticed for a long time, whereas an empty result tells you immediately that something needs fixing.
LTL: There was no new control group. The candidates were formulas that LTL-trained participants wrote in two earlier studies by the same group, and those participants' accuracy served as the baseline. PICK users were crowdworkers with no LTL background who never saw a formula. On RedOnce ("red is on in exactly one state"), they got 68% versus about 25%. Pooled across three problems, 56% versus about 44%.
Inverting PICK: a Paxos tutor
The PICK idea should also work for TLA+. You write a prose description, an LLM gives you several candidate specs, and PICK asks you about concrete behaviors until one survives. That would close the intent gap, but the hard part is the design, not the theory. The regex, LTL, and access-control scenarios are considered toy compared with a full TLA+ spec. How to apply PICK in a scalable and manageable wayto a TLA+ spec is an open question. What do we show, and at what level of abstraction? I have not attempted that, but instead I tried something simpler: a Paxos tutor built on the PICK idea.
PICK assumes the specification is unknown and the user is the oracle. We flip that around here. The Paxos specification is known, but in this case the user would need to be brought up to speed on it. Following this approach, I built an interactive Paxos tutor. Ok, Opus 5.5 built it, but I had to babysit it over at least ten rounds. It is hard to teach a machine empathy for the user. And it turns out, as I suspected, distributed algorithms are still very hard for an LLM to manage, even with TLC as a backend.
The app is called "Do you Paxos?" and it is available here. The candidates are correct Paxos plus eleven mutants, each one a misconception people hold. Questions come from the steps where correct Paxos and a mutant disagree. None of this is hand-written. The app runs its own Paxos state machine, and every question is generated from one of its reachable states, with the answer attached. A TLA+ spec of Paxos is checked against that state machine on every build, so the two cannot drift apart.
Less WAL, More Transactions: PostgreSQL and HorizonDB in VS Code
The previous post in this 9-TiB TPC-C PostgreSQL series ended with a direction: keep commit durability, but move persistence work away from the PostgreSQL writer. Here I look at what that architecture looks like in the dashboard, with PostgreSQL and HorizonDB running side by side.
I use the Microsoft PostgreSQL extension for Visual Studio Code. Its Waits, Overview/Metrics, and Queries tabs put backend activity, PostgreSQL counters, and statement statistics next to each other. The interesting part is not just which system completes more transactions. It is what the backends are doing while those transactions execute.
The comparison behind the screenshots
This November 9 measurement reused the two 95,000-warehouse databases, approximately 9 TiB each. Both ran public HammerDB 6.1.1 with the standard, nonpartitioned workload: 512 active workload users, a 15-minute ramp-up, and a 45-minute measurement.
| Configuration | PostgreSQL/Patroni | HorizonDB |
|---|---|---|
| Writer compute | E64bds_v5, 64 vCPUs / 512 GiB | Intel Gen1, 64 vCores |
| Data storage | 20-TiB Ultra SSD, NVMe | Disaggregated, shared storage |
| Shared buffers | 128 GiB (leaving room for OS buffers) | Approximately 362.83 GiB |
Workload synchronous_commit
|
local with no HA |
on for multi-zone HA |
The Ultra SSD was provisioned for 294,800 IOPS and 7,800 MB/s, with data and WAL on the same device to be sure not to be limited by the Premium SSD read ceiling I observed in the first run.
On PostgreSQL, synchronous_commit=local means that commit waits for the primary's WAL to become durable, but not for a standby acknowledgement. Replication remains enabled, asynchronously with respect to the commit response. Automatic Patroni failover was paused for this measurement. I'm deliberately comparing RPO>0 PostgreSQL on zone failure vs RPO=0 HorizonDB to focus on performance without high availability concerns.
In the paired screenshots, PostgreSQL/Patroni is on the left and HorizonDB on the right. The dashboard history includes ramp-up and some time outside the measurement. The HammerDB results below cover the 45-minute measurement.
More transactions with the same number of workers
The transaction and tuple graphs show a much higher level of activity on HorizonDB. Look at the axes as well as the lines: the panels use different vertical scales.
The completed HammerDB runs report:
| Measured throughput | PostgreSQL/Patroni | HorizonDB |
|---|---|---|
| New Orders Per Minute (NOPM) | 47,651 | 436,132 |
| PostgreSQL Transactions Per Minute (TPM) | 110,037 | 1,003,592 |
That is 9.15x the NOPM in this pair of runs. NOPM is the workload's completed new-order rate. PostgreSQL TPM comes from database transaction counters. The dashboard's System - 10s transaction chart at the top left displays activity per collection interval, not the final HammerDB NOPM result.
With the same 512 workload users, the higher throughput means that those workers get through more work rather than spending as much time queued behind shared resources. The Waits tab shows where that difference becomes visible.
PostgreSQL queues behind WAL writes
The left wait stack is dominated by PostgreSQL lightweight locks. On the right, the largest band is an extension wait associated with HorizonDB storage reads.
These are selected rows from the displayed ranking:
| Wait event | PostgreSQL/Patroni | HorizonDB |
|---|---|---|
LWLock:WALWrite |
80.4% | 14.9% |
LWLock:BufferContent |
10.0% | 0.5% |
IO:DataFileFlush |
4.4% | N/A |
IO:DataFileRead |
3.2% | N/A |
Extension:HorizonDB_Storage_Read |
N/A | 63.3% |
LWLock:WALInsert |
0.2% | 9.8% |
The percentages are shares of sampled backend observations in that dashboard history, not a transaction-latency breakdown. Its CPU category likewise is not host CPU utilization.
LWLock:WALWrite is a lock wait, not a direct measurement of disk-write duration. PostgreSQL serializes WAL writing and synchronization through this lock. While one backend performs that work, many other backends can wait for the lock before checking whether their own WAL position is already durable. Group commit lets a flush cover several transactions, but the waiting sessions still depend on that flush completing.
This explains why a slow WAL synchronization path can appear as hundreds of lock waiters rather than hundreds of sessions directly reporting an I/O wait. The separate 10-second capture inside the measured windows found an average of 426 active client backends at WALWrite on PostgreSQL, versus 79 on HorizonDB.
The WAL counters also report an average synchronization time of 29.79 ms per sync on PostgreSQL, versus 2.10 ms on HorizonDB. These are means of the reported WAL synchronization operations, not transaction commit latencies. They describe different persistence paths: a native local WAL flush on one side and the service's WAL durability path on the other.
Removing standby acknowledgement waiting therefore did not remove PostgreSQL's main queue. The primary still had to persist WAL locally.
Why the faster system still shows storage-read waits
HorizonDB_Storage_Read is the leading visible wait on the faster system. That identifies a page-request path and does not, by itself, identify an exhausted disk IOPS budget.
The HorizonDB storage architecture separates WAL servers from page servers. WAL servers specialize in low-latency log operations. Data pages are sharded across page servers, and a filtering service sends each shard the WAL relevant to its pages. Storage capacity and servicing work are not concentrated behind the writer's one attached data disk.
This is scale-out storage underneath one writer, not distributing these write transactions across multiple nodes. Requests still have latency, and a backend waiting for a page response exposes that latency as an extension wait. Once the large WAL queue is reduced, the read path occupies a larger share of the remaining observations. A leading read wait can coexist with much higher throughput.
On native PostgreSQL, DataFileRead is only 3.2% of the displayed observations. Together with the provisioned Ultra SSD budget, that shows why this comparison is no longer primarily about the original read-device ceiling. Reads remain work to do, but WAL serialization dominates this native run. Asynchronous replica acknowledgement also removes the standby wait from its commit path.
More WAL records, fewer WAL bytes
The next screenshot contains a useful apparent contradiction: HorizonDB produces many more WAL records, but fewer WAL bytes.
The bottom row is the important one here. WAL Bytes Written represents generated WAL bytes per collection interval, not physical disk bandwidth.
Counter differences over approximately 2,693 seconds inside each measured window give:
| WAL metric | PostgreSQL/Patroni | HorizonDB |
|---|---|---|
| Generated WAL | 327.22 GiB | 173.69 GiB |
| WAL generation rate | 124.42 MiB/s | 66.04 MiB/s |
| WAL records | 193,342,220 | 1,605,838,664 |
| Full-page images | 80,977,418 | 9,714,339 |
| Mean bytes per WAL record | 1,817 | 116 |
HorizonDB generates approximately 8.3 times as many records while producing about half the bytes. Dividing the generation rates by the reported PostgreSQL TPM gives an approximate 69.47 KiB versus 4.04 KiB of WAL per reported transaction, about 17.2x less on HorizonDB. That normalization includes background WAL and uses the nearby counter interval, so it is a workload-level indicator.
Why torn-page protection changes WAL volume
A PostgreSQL data page is normally 8 KiB. Writing it is not necessarily one crash-atomic operation through the filesystem and storage stack. A crash during a write can leave a mixture of old and new page contents: a torn page.
Normal WAL records describe changes to a page. Recovery needs a valid page on which to apply those changes. To protect against a torn page, PostgreSQL normally includes a full-page image on the first modification of that page after a checkpoint. WAL containing the recovery information must be durable before the data page is written. The PostgreSQL full-page-writes explanation describes this ordering.
On a large, write-heavy database, touching many different pages after checkpoints adds substantial image traffic to the log. Compression reduces the image bytes, but it does not remove the need to generate and process that protection.
The captured settings were:
| Setting | PostgreSQL/Patroni | HorizonDB |
|---|---|---|
full_page_writes |
on |
off |
wal_compression |
zstd |
lz4 |
HorizonDB can move that responsibility because its page servers protect against torn pages. As described in the storage design, compute persists changes through WAL and the storage layer reconstructs and persists data pages. PostgreSQL compute does not have to log the usual full-page images to protect its own durable data-file overwrites.
The protection has moved into storage, not been discarded. An Ultra SSD upgrade alone does not make that architectural change, and turning off full_page_writes on conventional storage is not the equivalent.
The HorizonDB image counter is still nonzero: full_page_writes=off does not prohibit every operation from emitting a page image. Also, wal_fpi counts images, not their compressed bytes. What the measurements show directly is much lower image frequency relative to WAL records and much lower WAL volume for the transactional work performed.
That reduces the amount of data entering the WAL persistence path. Combined with a purpose-built WAL service, it explains the direction of the throughput difference much better than the phrase "faster disks."
Checkpoint counters do not mean the same physical I/O
The same screenshot shows checkpoint activity on both systems. The retained measured-window counters report 3 requested checkpoints on PostgreSQL and 16 on HorizonDB, and 3,420,969 versus 150,107,572 checkpointer buffers written.
Those larger HorizonDB buffer counters do not contradict offloaded persistence. The dashboard exposes PostgreSQL engine activity, while the service changes how durable page storage is implemented. They cannot be converted into an equivalent number of physical writes to a compute-attached SSD.
In native PostgreSQL, the checkpointer and background writer write durable relation pages through the primary's filesystem and storage path. In HorizonDB, durable data-page writing and recovery belong to the page servers. Checkpoint-related coordination and buffer activity can remain visible on compute without recreating the native data-file persistence path.
Cache hits are another part of the picture
The top row shows cache-hit ratios high on both sides, with more buffer activity on HorizonDB. The shared-buffer configurations are different: 128 GiB versus approximately 362.83 GiB.
HorizonDB also has a compute-local NVMe SSD cache, adding another tier before remote page storage. PostgreSQL's buffer-cache-hit graph is not a measurement of that SSD cache's hit rate. A page absent from shared buffers is not automatically a remote storage read, and a small SSD-cache wait share does not count how many quick cache hits occurred.
The read-side explanation therefore includes both a different cache hierarchy and a distributed page-serving layer. It is not simply that the two systems read the same pages from different SSD models.
Higher throughput is not a uniform query-latency multiplier
The Queries tab gives another view of the workload. These snapshots were taken around 18:30-18:31 CET, before the final throughput result.
PostgreSQL:
HorizonDB:
Selected displayed means are:
| Statement label | PostgreSQL/Patroni | HorizonDB |
|---|---|---|
neword |
91 ms | 31 ms |
payment |
8 ms | 5 ms |
slev |
165 ms | 143 ms |
delivery |
63 ms | 68 ms |
ostat |
2 ms | 3 ms |
New-order execution has a substantially lower displayed mean, as does payment. Delivery and order-status do not. These are statement-entry means from the displayed statistics history, with all databases and users selected, rather than the final HammerDB measurement.
The prepare neword ... labels identify pg_stat_statements entries. They do not mean that the displayed duration is merely SQL preparation overhead. Total statement time sums concurrent execution: HorizonDB can show more total hours while also showing a lower mean and many more calls.
This is why I read throughput, waits, WAL, and query statistics together. Higher system throughput does not require every statement to be faster by the same factor. Reducing a heavily shared persistence queue changes how much work the whole workload can complete.
The architectural difference is visible
The earlier posts followed successive limits: data reads, WAL synchronization, and shared-buffer contention. This comparison returns to locally durable commits on native PostgreSQL, with Ultra SSD storage and no standby acknowledgement wait, and observes the two systems together.
The dashboard tells a consistent story:
- PostgreSQL still concentrates sessions behind WALWrite, even after the read-storage upgrade and removal of replica acknowledgement waiting.
- HorizonDB generates much less WAL for much more transactional work, consistent with moving torn-page protection out of PostgreSQL's normal full-page logging.
- The visible wait mix shifts toward page requests and remaining WAL coordination, supported by a larger buffer cache, an SSD cache, and scale-out page storage.
- Checkpoint activity remains visible, but durable data-page persistence is no longer the writer's native filesystem work.
HorizonDB keeps WAL as the durable record of changes, while dedicated storage services handle log durability, replication, and page materialization. The writer does less persistence work, and less image-associated WAL enters its critical path.
The 9.15x NOPM is the measured outcome of this pair. The screenshots make the architectural explanation concrete: not just more IOPS, but less work concentrated on the PostgreSQL writer.
Percona Database Service Is Now Open Source
We have some exciting news to share: Percona Database Service (PDS) is now open source! The source code is available on GitHub under the Apache 2.0 license, and we’ve also launched a redesigned PDS website to make it easier to explore and get started. When we first introduced PDS, our goal was simple: make deploying … Continued
The post Percona Database Service Is Now Open Source appeared first on Percona.
Oracle’s November CSPU and Percona for MySQL
Oracle published its November 2026 CSPU (Critical Security Patch Update) on November 17, with 10 new security patches for MySQL. Three of them can be exploited over the network without authentication. Percona tracks every Oracle security release, and we’re already working on this one. Oracle published the MySQL 8.4 source code for these fixes on … Continued
The post Oracle’s November CSPU and Percona for MySQL appeared first on Percona.
Pre-Calculating HugePages for PostgreSQL
Pre-Calculating HugePages for PostgreSQL Huge pages (HugeTLB) are one of the most important PostgreSQL tuning steps, and they must be right before the server starts. They matter mainly for stability and reliability, more than for speed. Recently I also came across reports of up to 30% performance gain as an added benefit, but only for … Continued
The post Pre-Calculating HugePages for PostgreSQL appeared first on Percona.
November 23, 2026
DuckDB inside MySQL: a talk from DuckDB × MySQL Day
Putting Sixta to the Test: AI-Assisted MySQL Troubleshooting with PMM
Sixta is an AI agent that investigates database problems the way a DBA would. We wanted to evaluate how effectively it could diagnose MySQL problems using only the monitoring data already available in Percona Monitoring and Management (PMM). To test this, we set up a Percona Server for MySQL 8.0 primary-replica environment monitored by PMM. … Continued
The post Putting Sixta to the Test: AI-Assisted MySQL Troubleshooting with PMM appeared first on Percona.
How to Monitor Readyset with Percona Monitoring and Management
In a previous blog post, I showed how to add external exporters to Percona Monitoring and Management (PMM) and monitor Valkey/Redis. This time, let’s do the same with Readyset. Readyset is a caching layer that sits between your application and your MySQL or PostgreSQL database. It is wire-compatible with the database, so your application connects … Continued
The post How to Monitor Readyset with Percona Monitoring and Management appeared first on Percona.
Why you shouldn't do application-level sharding
November 22, 2026
"And You Would Be Supporting A Local Paper"
Last spring my dear friend Taber was doored while riding his bike, and came very close to dying. A friend and I got in our cars, made it to the hospital by three AM, and spent the next week caring for him. We traded off sitting at his bedside, making sure the machines keeping him alive stayed plugged in, coordinating with a dozen-odd specialists, taking notes, working with the medical and city bureaucracy, and transitioning to home care. My client was kind enough to let me take some time off, but I was still trying to work my way through a slew of database bugs during spare moments. We stayed in a hotel best described as “backrooms”, and I picked up a case of scabies. There was one point where I started crying while trying to pick out thank-you cards at Target. It was, in short, an exceedingly rough time, and it took the better part of a month to really recover.
Taber, thank goodness, has made a spectacular recovery, and I’m so happy for him. My friend who came to care for him was an incredible rock, and I couldn’t have asked for a more compassionate, diligent, and trustworthy partner. Our family and friends who took care of our homes and pets while we vanished—thank you so much. I’m incredibly grateful to everyone at Hennepin County Medical Center, the first responders, the folks at the Minneapolis Public Services building, the care workers, and everyone who donated to help get him back on track. I was, and remain, deeply moved.
This is by far the more important story, but something else happened that week—something so surreal and deeply silly that I want to relate it as well. I started getting spam.
I mean, we all get spam. As someone who’s been around the net for a while, I get a lot of it. But these emails got through the filters, and came almost every day. They were all from the same guy, “Tom Santogato”. They had the obnoxious hallmarks of LLM slop. Between trying to get video footage from the city and buying medical equipment, I’d read:
Hi Fabiola,
Quick question, when was the last time you knew exactly what your brand truly makes on every dollar spent? Most DTC founders tell me they track CAC and margins, but the reality they act on is often off by enough to flip decisions.
That’s why I built something different: a free 45-minute Financial Diagnostic that calculates true unit economics, contribution margin, CAC, and first-order profitability the way investors would, live on screen.
Here’s what makes it powerful:
📌 Real vs reported metrics: we reconcile your Shopify + ad platform data the right way.
📊 Understand what you actually keep on every sale: after discounts, shipping, returns, processing, and fulfillment.
🚀 Turn insights into action: plan budgets, scale channels with confidence, or prep for growth/raising capital.
✔️ All live. All transparent. No dashboards to guess from, just clarity.
If this feels like the kind of visibility missing from your strategy, let’s book a time — zero risk, no commitment, just real metrics that move decisions.
👉 Book your free 45-minute Financial Diagnostic: https://calendly.com/[redacted] 📆
Would Monday or Tuesday work better for you?
I clicked the unsubscribe link. I know this is usually a trap, but also, due diligence. They kept coming, of course.
Hi Fabiola,
I saw Woof posted about {{specific_hiring_initiative}} last week—and noticed your team has been actively engaging with hiring content over the past few days.
One thing we’ve found working with similar-sized teams: the biggest bottleneck in that phase isn’t usually finding candidates, it’s {{specific_pain_point_related_to_their_signal}}. Most teams don’t realize this until they’re 4-6 weeks in.
Not sure if that’s on your radar, but thought it was worth flagging given the timeline you’re working with.
Worth a quick conversation?
{{signature}}
To be clear, my name’s not Fabiola. Woof.group is a community forum that runs on a shoestring budget. We can’t hire anyone for anything, and certainly not {{specific_hiring_initiative}}. This would be immediately obvious to anyone who did a moment’s research.
I was exhausted and haunted by death, and these ridiculous, slop-filled emails kept coming, week after week. Staring into the middle distance, I booked the meeting he asked for, intending to ask him to politely to please stop emailing me. He canceled the meeting. I tried again. He canceled again.
The emails kept coming. I started calling him on the phone every time he sent an email. He never picked up. I was chatting with some friends about the emails—how I was at my wit’s end, how deeply stupid the whole thing was, and how many other people whose time he must be wasting. I asked if it would be reasonable and polite to write a physical letter to him asking him to stop sending spam. And someone suggested:
Too bad we don’t live in an age where you could take out a prominent newspaper ad in his home town paper
Another friend chimed in:
And you would be supporting a local newspaper
I called the ad manager of his local newspaper. It took a couple minutes to explain what was going on, I wanted to make sure it wouldn’t create any trouble for the paper, and she needed to run it by her team. But the answer came back, “yes”—and it was a lot cheaper than I thought. I got the dimensions and worked up an ad in Inkscape.
You know what? That worked! Haven’t gotten a single spam email from Tom since.
I can’t say this is time- or cost-effective. Mostly I just sigh and feed the email to the Bayesian filters, hoping they’ll catch it next time. But this spam caught me at an absurd, difficult time in my life, and in retrospect, I’m weirdly proud of what happened. Woof.group is tiny, which tells me that this campaign was likely casting a broad net. Somewhere out there, I bet there are thousands of people who were getting spam from Tom and rolling their eyes. I’d like to imagine that one day in July, the emails stopped for them too.
EXPLAIN ANALYZE shows the HorizonDB SSD cache hits/misses
HorizonDB separates storage from compute: PostgreSQL compute runs in front of remote storage for high availability, while a local SSD cache reduces remote reads for low latency.
In a previous post, when HorizonDB was in preview, I used EXPLAIN (ANALYZE, BUFFERS) and I/O timings to estimate whether PostgreSQL reads were coming from the local SSD cache or remote storage.
This is now directly visible in the execution plan with the SSDCACHE option:
EXPLAIN (ANALYZE, BUFFERS, SSDCACHE)
SELECT * FROM large;
For example, here is a sequential scan of a 56 GB table:
QUERY PLAN
---------------------------------------------------------------------------
Seq Scan on large (actual time=0.138..207836.006 rows=7372800.00 loops=1)
Buffers: shared read=7372800 dirtied=12800 written=1
I/O Timings: shared read=200058.305 write=0.001
SSD cache: hits=7372799 misses=1
Planning Time: 0.022 ms
Execution Time: 208112.478 ms
There are two levels of information here.
BUFFERS tells us what happened from PostgreSQL's point of view:
Buffers: shared read=7372800. The scan didn't find these pages in PostgreSQL shared buffers, so it had to read 7,372,800 × 8 KiB = 56.25 GiB into them.SSDCACHE tells us where those reads were satisfied:
SSD cache: hits=7372799 misses=1. Of those reads, 7,372,799 pages—essentially the entire 56.25 GiB—were found in the local SSD cache. Only one 8 KiB page missed the cache and had to be read from the lower storage tier.
The important point is that an SSD-cache hit is still a PostgreSQL shared read. These are not two independent counters:
PostgreSQL needs a page
|
+-- shared hit --> already in shared buffers
|
+-- shared read
|
+-- SSD cache hit --> read locally
|
+-- SSD cache miss --> lower storage tier
This makes SSDCACHE a useful complement to BUFFERS: BUFFERS shows whether PostgreSQL had to perform a read, while SSDCACHE shows whether the local SSD cache satisfied it.
Here's another example where the cache starts missing:
Seq Scan on large
Buffers: shared hit=1786023 read=6917977
I/O Timings: shared read=307554.308
SSD cache: hits=6740355 misses=177074
Here, PostgreSQL performs 6,917,977 shared reads (52.78 GiB). Of these, 6,740,355 pages (51.42 GiB) hit the local SSD cache, while 177,074 pages (1.35 GiB) missed it.
Previously, I had to infer this distinction from I/O timings. Now, EXPLAIN (ANALYZE, BUFFERS, SSDCACHE) shows directly how PostgreSQL reads are distributed between the local SSD cache and the lower storage tier.
This cache hierarchy meets the needs of most OLTP applications:
- a small, hot working set in PostgreSQL shared buffers, including current transactions, reference tables, and internal index pages. You expect
Buffers: shared hitinEXPLAIN (ANALYZE, BUFFERS)for them. - a larger, warm working set in the local SSD cache, including recent transactions, pages awaiting vacuuming, and less frequently accessed data. You expect
SSD cache: hitsinEXPLAIN (ANALYZE, SSDCACHE)for them. - cold data served through the page servers or, when necessary, from blob object storage, where throughput and low cost matter more than low latency. You see
SSD cache: missesinEXPLAIN (ANALYZE, SSDCACHE)for them.
Both SSD cache: hits and SSD cache: misses correspond to Buffers: shared read in EXPLAIN (ANALYZE, BUFFERS): the page wasn't already in shared buffers and had to be read into one. SSDCACHE adds the missing information about where that read was served from, which helps explain its I/O performance.
November 20, 2026
JSONB performance: declare access patterns to PostgreSQL query planner
A common drawback of storing data in JSON fields is limited planner visibility: the optimizer doesn't automatically inspect documents, so selectivity estimates for JSON (or JSONB or BSON) predicates are often weak when useful statistics aren’t available. That’s expected—if you choose JSON to avoid defining the full application schema in the database upfront, the database can’t infer everything about those fields.
But this isn’t an all-or-nothing tradeoff. Even in MongoDB, you still declare part of the schema in practice—especially filter fields—through indexes. PostgreSQL, gives you two levers:
- expression indexes (which provide both access paths and statistics)
- extended statistics (which improve estimates even without adding an index).
I'm using an example from an old article by Dan Robinson on the Heap blog: When To Avoid JSONB In A PostgreSQL Schema. At the time, PostgreSQL 9.4 didn't support extended statistics, but expression indexes could have solved this (example on db<>fiddle), avoiding the expensive nested-loop join and producing good cardinality estimates.
I've run the following in a lab:
CREATE TABLE measurements (tick BIGSERIAL PRIMARY KEY, record JSONB NOT NULL)
;
INSERT INTO measurements (record)
SELECT jsonb_build_object(
'value_1', trunc(2 * random())::int,
'value_2', trunc(2 * random())::int,
'value_3', trunc(2 * random())::int,
'scientist_id', trunc(10000 * random() + 1)::bigint
)
FROM generate_series(1, 100000)
;
CREATE TABLE scientist_labs (scientist_id BIGINT PRIMARY KEY, lab_name TEXT NOT NULL)
;
INSERT INTO scientist_labs (scientist_id, lab_name)
SELECT i,(ARRAY['California Scientific','Industrial Labs','Western Science People'])[(i % 3) + 1]
FROM generate_series(1, 10000) AS i
;
VACUUM (ANALYZE) measurements
;
VACUUM (ANALYZE) scientist_labs
;
Get the execution plan for this query:
EXPLAIN (ANALYZE, BUFFERS)
SELECT s.lab_name, COUNT( * )
FROM (
SELECT (record ->> 'scientist_id')::BIGINT AS scientist_id
FROM measurements
WHERE (record ->> 'value_1')::INT = 0
AND (record ->> 'value_2')::INT = 0
AND (record ->> 'value_3')::INT = 0
) AS m
JOIN scientist_labs AS s
ON s.scientist_id = m.scientist_id
GROUP BY s.lab_name
ORDER BY s.lab_name
;
The estimated cardinality for "measurements" after the filter is rows=1, which is why PostgreSQL chooses a Nested Loop. However, the actual row count is rows=12518.00, so "scientist_labs" is accessed loops=12518 times:
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
GroupAggregate (cost=5827.32..5827.34 rows=1 width=28) (actual time=145.667..166.436 rows=3.00 loops=1)
Group Key: s.lab_name
Buffers: shared hit=39186
-> Sort (cost=5827.32..5827.33 rows=1 width=20) (actual time=139.215..150.787 rows=12518.00 loops=1)
Sort Key: s.lab_name
Sort Method: quicksort Memory: 645kB
Buffers: shared hit=39186
-> Nested Loop (cost=0.29..5827.31 rows=1 width=20) (actual time=0.156..126.483 rows=12518.00 loops=1)
Buffers: shared hit=39186
-> Seq Scan on measurements (cost=0.00..5819.00 rows=1 width=105) (actual time=0.029..60.878 rows=12518.00 loops=1)
Filter: ((((record ->> 'value_1'::text))::integer = 0) AND (((record ->> 'value_2'::text))::integer = 0) AND (((record ->> 'value_3'::text))::integer = 0))
Rows Removed by Filter: 87482
Buffers: shared hit=1819
-> Index Scan using scientist_labs_pkey on scientist_labs s (cost=0.29..8.31 rows=1 width=28) (actual time=0.002..0.002 rows=1.00 loops=12518)
Index Cond: (scientist_id = ((measurements.record ->> 'scientist_id'::text))::bigint)
Index Searches: 12518
Buffers: shared hit=37367
Planning Time: 0.433 ms
Execution Time: 166.557 ms
(19 rows)
Compare the Planned rows with the actual rows:
This is not optimal but easily fixed by indexing the fields used to filter:
CREATE INDEX measurements_value_1_idx ON measurements (
((record ->> 'value_1')::INT)
);
CREATE INDEX measurements_value_2_idx ON measurements (
((record ->> 'value_2')::INT)
);
CREATE INDEX measurements_value_3_idx ON measurements (
((record ->> 'value_3')::INT)
);
ANALYZE measurements;
We index an expression to retrieve its value by using the full path, and specify the data type the filter uses. This is like declaring part of the schema for the "schemaless" datatype—the parts correspond to the access pattern.
ANALYZE also gathers statistics about the index keys for the query planner, which uses them for the query:
QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=4309.88..4309.88 rows=3 width=28) (actual time=96.348..96.403 rows=3.00 loops=1)
Sort Key: s.lab_name
Sort Method: quicksort Memory: 25kB
Buffers: shared hit=1977
-> HashAggregate (cost=4309.82..4309.85 rows=3 width=28) (actual time=96.310..96.362 rows=3.00 loops=1)
Group Key: s.lab_name
Batches: 1 Memory Usage: 32kB
Buffers: shared hit=1977
-> Hash Join (cost=1395.30..4247.13 rows=12538 width=20) (actual time=25.260..80.897 rows=12518.00 loops=1)
Hash Cond: (((measurements.record ->> 'scientist_id'::text))::bigint = s.scientist_id)
Buffers: shared hit=1977
-> Bitmap Heap Scan on measurements (cost=1099.30..3913.50 rows=12538 width=105) (actual time=2.671..25.013 rows=12518.00 loops=1)
Recheck Cond: ((((record ->> 'value_2'::text))::integer = 0) AND (((record ->> 'value_1'::text))::integer = 0))
Filter: (((record ->> 'value_3'::text))::integer = 0)
Rows Removed by Filter: 12593
Heap Blocks: exact=1819
Buffers: shared hit=1906
-> BitmapAnd (cost=1099.30..1099.30 rows=24880 width=0) (actual time=2.416..2.430 rows=0.00 loops=1)
Buffers: shared hit=87
-> Bitmap Index Scan on measurements_value_2_idx (cost=0.00..545.74 rows=49793 width=0) (actual time=1.210..1.213 rows=49896.00 loops=1)
Index Cond: (((record ->> 'value_2'::text))::integer = 0)
Index Searches: 1
Buffers: shared hit=43
-> Bitmap Index Scan on measurements_value_1_idx (cost=0.00..547.04 rows=49967 width=0) (actual time=1.144..1.147 rows=50332.00 loops=1)
Index Cond: (((record ->> 'value_1'::text))::integer = 0)
Index Searches: 1
Buffers: shared hit=44
-> Hash (cost=171.00..171.00 rows=10000 width=28) (actual time=22.575..22.584 rows=10000.00 loops=1)
Buckets: 16384 Batches: 1 Memory Usage: 727kB
Buffers: shared hit=71
-> Seq Scan on scientist_labs s (cost=0.00..171.00 rows=10000 width=28) (actual time=0.025..11.113 rows=10000.00 loops=1)
Buffers: shared hit=71
Planning Time: 0.278 ms
Execution Time: 96.487 ms
(34 rows)
The estimated cardinality of "measurements" (rows=12538) is close to the actual count (rows=12518), so the query planner chooses a Hash Join and reads "scientist_labs" only once.
The query planner estimates the predicate’s overall cardinality by multiplying the selectivity of each field. This works here because the fields are uncorrelated. Three separate indexes offer flexibility when queries don’t filter on all three fields, but require a bitmap combination. If the fields always appear together in the filter, a compound index would be better:
CREATE INDEX measurements_value_123_idx ON measurements (
((record ->> 'value_1')::INT)
,
((record ->> 'value_2')::INT)
,
((record ->> 'value_3')::INT)
);
ANALYZE measurements;
The query planner prefers this index, and it still estimates cardinality correctly: rows=12564 for rows=12518.00:
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=2922.62..2922.63 rows=3 width=28) (actual time=71.266..71.279 rows=3.00 loops=1)
Sort Key: s.lab_name
Sort Method: quicksort Memory: 25kB
Buffers: shared hit=1890 read=12
-> HashAggregate (cost=2922.57..2922.60 rows=3 width=28) (actual time=71.246..71.257 rows=3.00 loops=1)
Group Key: s.lab_name
Batches: 1 Memory Usage: 32kB
Buffers: shared hit=1890 read=12
-> Hash Join (cost=500.48..2859.75 rows=12564 width=20) (actual time=17.645..59.549 rows=12518.00 loops=1)
Hash Cond: (((measurements.record ->> 'scientist_id'::text))::bigint = s.scientist_id)
Buffers: shared hit=1890 read=12
-> Bitmap Heap Scan on measurements (cost=204.48..2526.04 rows=12564 width=105) (actual time=0.669..16.853 rows=12518.00 loops=1)
Recheck Cond: ((((record ->> 'value_1'::text))::integer = 0) AND (((record ->> 'value_2'::text))::integer = 0) AND (((record ->> 'value_3'::text))::integer = 0))
Heap Blocks: exact=1819
Buffers: shared hit=1819 read=12
-> Bitmap Index Scan on measurements_value_123_idx (cost=0.00..201.34 rows=12564 width=0) (actual time=0.465..0.466 rows=12518.00 loops=1)
Index Cond: ((((record ->> 'value_1'::text))::integer = 0) AND (((record ->> 'value_2'::text))::integer = 0) AND (((record ->> 'value_3'::text))::integer = 0))
Index Searches: 1
Buffers: shared read=12
-> Hash (cost=171.00..171.00 rows=10000 width=28) (actual time=16.956..16.959 rows=10000.00 loops=1)
Buckets: 16384 Batches: 1 Memory Usage: 727kB
Buffers: shared hit=71
-> Seq Scan on scientist_labs s (cost=0.00..171.00 rows=10000 width=28) (actual time=0.016..8.454 rows=10000.00 loops=1)
Buffers: shared hit=71
Planning:
Buffers: shared hit=26 read=1
Planning Time: 0.521 ms
Execution Time: 71.397 ms
(28 rows)
The same from the PostgreSQL extension visualization in Visual Studio Code:
Even when I disable index access, the cardinality estimate remains correct:
postgres=# set enable_bitmapscan to off;
SET
postgres=# EXPLAIN (ANALYZE, BUFFERS)
SELECT s.lab_name, COUNT( * )
FROM (
SELECT (record ->> 'scientist_id')::BIGINT AS scientist_id
FROM measurements
WHERE (record ->> 'value_1')::INT = 0
AND (record ->> 'value_2')::INT = 0
AND (record ->> 'value_3')::INT = 0
) AS m
JOIN scientist_labs AS s
ON s.scientist_id = m.scientist_id
GROUP BY s.lab_name
ORDER BY s.lab_name
;
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=6215.58..6215.59 rows=3 width=28) (actual time=98.676..98.691 rows=3.00 loops=1)
Sort Key: s.lab_name
Sort Method: quicksort Memory: 25kB
Buffers: shared hit=1890
-> HashAggregate (cost=6215.53..6215.56 rows=3 width=28) (actual time=98.652..98.665 rows=3.00 loops=1)
Group Key: s.lab_name
Batches: 1 Memory Usage: 32kB
Buffers: shared hit=1890
-> Hash Join (cost=296.00..6152.71 rows=12564 width=20) (actual time=22.378..85.932 rows=12518.00 loops=1)
Hash Cond: (((measurements.record ->> 'scientist_id'::text))::bigint = s.scientist_id)
Buffers: shared hit
November 19, 2026
From instant Aurora PostgreSQL databases to production-ready in your VPC
Building a no-code AI app on Amazon Aurora DSQL with agent skills, plugins, and MCP
Performance impact of excessive logging in Amazon Aurora PostgreSQL
Announcing VillageSQL Server 0.0.8
Java4Shell Vulnerability: Percona Security Update
November 19, 2026 | Percona Security Team Percona is aware of the recently disclosed Java4Shell vulnerability (CVE-2026-114938), a critical security issue reportedly affecting OpenJDK and related Java distributions. The vulnerability involves memory corruption in Java’s Base64 decoder and may allow unauthenticated remote code execution (RCE) under certain conditions. Following the public disclosure, Percona’s Security … Continued
The post Java4Shell Vulnerability: Percona Security Update appeared first on Percona.
Why MySQL OR is slower than IN
Queries with OR conditions are commonly used to implement business logic. However, it might be slower than we expected. Although the query below scans only 1 million rows, it runs for 6,7254 seconds. [crayon-6afe45fcc8337811746452/] The CPU profile indicates that 99% of CPU time was spent in [crayon-6afe45fcc8341482406539-i/] on MySQL 8.4. [crayon-6afe45fcc8344072208938/] How MySQL evaluates OR conditions MySQL … Continued
The post Why MySQL OR is slower than IN appeared first on Percona.
Building PlanetScale with Insights Agent
November 18, 2026
How to use Amazon Aurora DSQL audit logs
Village News: MySQL News + Events (18 November 2026)
Welcome back to Village News, our curated roundup of MySQL and database news. This week, MariaDB shipped its Q4 maintenance releases across four LTS series, and OurSQL Foundation opened a call for MySQL-compatible projects to share its FOSDEM 2027 booth.
If you want to get these updates, just subscribe
TLAPS-Bench: Formally Proving Correctness Of Real-World System Specifications With TLA+ Proof System
TLA+ specification language has long been associated exclusively with TLC model checker in most people's minds. Model checking with TLC finds bugs fast, but it only covers the configuration you give it, and is cheap only for small configurations (3 nodes, value ranges "1..4", etc.). There is also the TLA+ Proof System, TLAPS, which checks a deductive proof, instead of enumerating states like model checking. After you write the proof in TLA+ as a hierarchy of numbered steps, TLAPS turns each step into proof obligations and hands them to backend provers. Being a prover, TLAPS can cover all configurations at once, but it requires a lot of expertise and effort. I had always stayed away from TLAPS, because I hadn't felt I am up to the challenge. You have to figure out the inductive invariant (see below), show every action preserves it, and divide the argument into obligations small enough for Z3, Isabelle, or LS4 to check. So in practice what ends up happening is that almost everyone model checks and almost nobody proves.
Well, like with most things in our industry, this changed drastically in the last year. Earlier this summer, my mind was blown when I saw Claude doing TLAPS proofs! Holy molly, I didn't have this on my bingo card for this year! I knew it would be smart to invest more on this, and it turns out Tianyin Xu, Qian Cheng, and Markus Kuppe were already working on it, and they had a paper in the works. I joined the team late, and I am not sure if I was able to contribute significantly. It was great to collaborate and associate with such a qualified team nevertheless.
The paper is now on arXiv, and the code is on GitHub. The paper asks how much of the proof burden the agents can carry today, and introduces a benchmark and a harness to investigate this. TLAPS-Bench is a benchmark of 265 proof targets from 95 TLA+ specs of real systems and protocols. Tilapia is the harness that runs agents on those targets, and it provides the proof checker, the model checkers, the proof libraries, and the guards that keep agents from cheating. We evaluated on the 70 hardest targets, and the best model proved 44.3% of them. I hope the labs use TLAPS-Bench to train agents to get a lot better at proofs, and at autoformalization in general, over the next few model releases.
What's new here?
Most verification benchmarks are limited proof-completion tasks. They hand the model a scaffold. Selene and FVELer pull lemmas out of seL4's Isabelle proof. CoqStoq and VeriSoftBench pull theorems out of finished Rocq and Lean projects. NTP4VC supplies the verification conditions. VeruSAGE-Bench and Laurel extract functions from systems that were already verified. The model gets the helper lemmas, the intermediate invariants, or the theorem dependency structure, and fills in the gaps. TLAPS-Bench gives it none of that.
The second difference is scope. Dafny, Verus, and Lean benchmarks target the functional correctness of a single function, API, or module. Even the ones that ask the model for an invariant (DafnyBench and VerusBench), want a loop invariant inside one function. None of these asks for the inductive invariant of a distributed protocol. In contrast, TLAPS-Bench attacks this head on. The properties in TLAPS-Bench are about the whole system over time: no two leaders in a term, committed entries survive crashes, transactions serialize, cache lines stay coherent.
A recent paper, TLA-Verus, advocates translating TLA+ specs into Verus and proves them there, stating incorrectly that TLAPS cannot prove arbitrary temporal properties. (Writing `BY PTL` on a proof step tells TLAPS to treat that step as propositional temporal logic and send it to LS4, an LTL decision procedure.) On the contrary, translating out of TLA+ also means leaving the temporal logic behind. Verus verifies Rust, and it knows nothing about [] and <>, so you get temporal logic only as a library via Anvil. Anvil built always, eventually, leads_to, and WF1 on top of Verus. Lean, which has been getting a lot of deserved coverage lately, is in the same position. Lean is a general purpose proof assistant, so to reason about a protocol you write your own state machine and your own temporal operators, or borrow from another framework, like Veil. In TLA+ the state machine comes included with the language. You write variables, an initial predicate, and actions as before/after relations, and "always", "eventually", "leads_to" come with the logic. A behavior is an infinite sequence of states, and the spec and the property you want of it are both formulas over those behaviors. Verus and Lean are built for different jobs, and they are good at them. But TLA+ is where the state machine and the temporal logic come built in.
Refinement is the other thing you get for free in TLA+. To show that an implementation satisfies its abstract spec, you just write an implication between two temporal formulas. For each variable in the abstract spec, you supply a "refinement mapping" that computes it from the implementation's variables. Then you prove Concrete => Abstract, with the same prover you use for everything else. In other systems, refinement is machinery you have to build (via establishing/proving a simulation relation between the two state machines). Since TLA+ hands refinement to you as implication, TLAPS-Bench can carry refinement targets next to the safety and liveness ones, like Wildfire's cache coherence protocol refining the Alpha memory model. Nice!
So TLA+ lets you state the global system properties you actually care about, and TLAPS proves it for every configuration rather than the few small ones TLC can enumerate. This combination is what our benchmark builds on. TLAPS-Bench gives the agent a spec and a target theorem such as Spec => []LeaderUniqueness. These targets come from real system specs (etcd Raft, HashiCorp Raft, ZooKeeper, CCF, MongoDB distributed transactions), and include liveness and refinement, not just safety. The full collection has 95 specs and 265 targets, but the easy ones have been taken out. Classics like Paxos, Bakery, and Byzantine Paxos are things current agents already prove, so they sit in the appendix. (I can't believe I typed that. We are talking about the agents proving Byzantine Paxos out of the box!) What remains is an active set of 70 hard targets across 12 specs. The results in our paper cover only this active set, and the best model proved 31 of the 70 targets. This leaves plenty of room in our benchmark for the AI labs to tackle.
Falsify before you prove
This is the idea I like best in the paper. It shows how versatile the TLA+ ecosystem is. TLC and Apalache read the same TLA+ module TLAPS is working on, and they shoot down a bad candidate invariant in seconds, before the prover spends anything on it. Let me explain.
Let's start with what an inductive invariant is, since the rest of the section depends on it. You have a safety property Inv, and you want it to hold in every reachable state. A model checker gets there by enumerating the reachable states. A proof cannot enumerate, so it uses induction, and for that you need an IndInv with three properties: Init => IndInv, IndInv /\ Next => IndInv', and IndInv => Inv. The first two say the states satisfying IndInv include all initial states and are closed under the transition relation, so they include every reachable state. The third says IndInv still fits inside the property you wanted. So IndInv is squeezed from both sides. It has to be loose enough to be closed under Next, and tight enough to stay inside Inv.
Finding an inductive invariant is a guess-and-check loop. You guess a candidate, try to prove it, fail, stare at the failed obligation, and guess again. On TLAPS alone, each turn of that loop is slow and expensive. A failed SMT obligation says "unknown", and you are left to work out whether the candidate is false, too weak, or just needs a better decomposition.
So the idea is to put a model checker in the loop. TLC answers "is this candidate even true?" in seconds, and when the answer is no, it hands back a counterexample. That is much richer feedback than "unknown", because it shows exactly which state breaks which conjunct.
Figure 3 shows this loop. Let's say the agent wants to prove mutual exclusion via a token. It proposes as inductive invariant that "exactly one node holds the token". TLC returns a violation trace where node A sends the token and, while the message is in transit, no node holds it. So the agent refines to "exactly one node or in-transit message holds the token." TLC finds no violation, and this tells the agent that the candidate is worth proving for any number of nodes.
Apalache, being symbolic, brings a real advantage to the table. Instead of listing states one at a time, Apalache compiles the spec and a bounded number of steps into SMT constraints and asks Z3 whether a violation exists anywhere in that bound. That is what we want here, because it can start from every state satisfying a predicate, not just the states you can afford to list.
Our recipe is three checks. Write the candidate as IndInv == TypeOK /\ H, where TypeOK pins the domain of every variable and H carries the content. First, start from the real initial states and check the candidate holds there in zero steps: that is Init => IndInv. Second, start from /any/ state satisfying the candidate, take one step, and check the candidate still holds: that is IndInv /\ Next => IndInv'. Third, start from any state satisfying the candidate and check the target property holds in zero steps: that is IndInv => Inv. The second check is the interesting one. Starting from all candidate states rather than only the reachable ones makes this a true test of inductiveness. These three TLAPS obligations are falsified cheaply before we pay to prove them.
Apalache's symbolic encoding comes with the constrain that it has to type the spec. TLA+ is untyped set theory: a variable can hold a number in one state and a set of records in the next, and nothing in the language complains. But SMT has to know, so Apalache asks you to annotate every constant and variable with a type and infers the rest. When Apalache can't type the spec, we fall back to TLC with a trick from Lamport: make the candidate its own initial predicate (INIT IndInv, INVARIANT IndInv). This is the same inductiveness test as Apalache's second check, but this time performed by brute force instead of symbolically. TLC has to list every state satisfying the candidate before taking a step, and that list explodes quickly. To keep this tractable, we put each conjunct right after the TypeOK clauses that bind its variables so TLC prunes early, and sample large domains with RandomSubset. (I guess this might sound like gooble-de-gook to you, but you would have appreciated this if you had worked hands-on with TLC.)
Again, all of this is for identifying the inductive invariant. TLAPS gives definitive irrefutable proof after we identify an inductive invariant.
You Can't Cheat the Tilapia
We named our agentic framework Tilapia (TLA+ Proof Infrastructure for Agents). Beside the phonetic fit, we also went for a subliminal message here. Tilapia is about the toughest fish out there. It tolerates low oxygen, murky water, wide temperature swings, and brackish water, and it eats nearly anything. It is the cockroach of the pond.
Tilapia gives each run its own Docker container with pinned versions of the four TLA+ tools: SANY for parsing, TLAPS for proofs, TLC and Apalache for model checking. The container also holds the TLAPS library and CommunityModules for set and sequence theorems, two skills that teach the agent the model checking recipes from the previous section, and a check_proof_bin command that gives the same verdict the final grading gives. A task is three modules: the model, the target properties, and a third one where the agent writes helper definitions, lemmas, and one proof per target.
The harness needed to be tough, because the agents tried to cheat. We saw three kinds in early runs, before the current checks were in place. An agent added ASSUME Useful == FALSE to the module and derived ZooKeeper's agreement theorem from it. An agent cited a helper lemma whose proof was PROOF OMITTED. An agent replaced /opt/tlapm/bin/tlapm with a shell script that printed "All 214 obligations proved" and exited 0.
Tilapia has three fences, one for each of those. The first is context integrity. The model and the target theorems sit in read-only modules, and SANY rejects any new ASSUME, AXIOM, CONSTANT, or VARIABLE in the agent's region. The agent can add definitions and lemmas, but it cannot change the context the target is proved in. The second is dependency tracking. SANY collects the lemma citations into a dependency graph, and a target counts only if its own proof checks and every lemma it cites, transitively, is proved too. The third is clean-room grading. The verdict comes from a fresh container with the original task files and unmodified tools, carrying over only the submitted module, so a patched tlapm or a helpful scratch wrapper never reaches the grader.
Proofmaxxing
So what happened when we ran this? We put four GPT models through Codex at max, high, and low reasoning effort, twelve configurations over the 70 targets. Every number is pass@3. Each target gets three independent runs, and it counts if any one of them proves it. Each run gets its own container, with an hour of TLAPS time per proof and a budget of two million output tokens per spec.
Max effort is where every model does its best. GPT-6.1 Sol proved 31 (44.3%). GPT-6 Astra proved 30 (42.9%), using about half Sol's tokens at three times the price. GPT-5.6 Terra proved 15 (21.4%) for and over 36 days of cumulative agent time. GPT-6 Luna proved 7 (10%). Sol and Astra both proved all 15 FLASH targets, eight of them liveness.
If you turn the effort down, things degrade quickly. Sol and Astra drop to 24 or 25 targets. Terra and Luna prove nothing at high or low effort. Below some reasoning threshold, you get no proof. Nobody proved the Wildfire refinement at any effort.
Lessons learned
Table 5 sorts every attempt that did not end in an accepted proof over all models, effort levels, and runs. The two big buckets are where the difficulty is: 1,455 incomplete proofs and 537 undecomposed proof attempts.
Incomplete proofs mean the invariant was never found. This is the biggest bucket. Either the agent could not find an inductive invariant strong enough for the target, or it proved a stack of helper lemmas and never connected them to the target. Here are two examples. On OpenAddressing's Consistent, Astra split the proof in two. The case with no hash collisions it proved with a dedicated invariant. The case with collisions and evictions it handed to a single SMT call citing three invariants it already had. Its own comment in the proof says that case needs a stronger invariant. So the accepted part of the proof only covers configurations where no collision ever happens. On Ivy TLB's NonStarvation, the agent proved the safety target with a 29-lemma inductive invariant, then tried to get liveness from that invariant plus the fairness assumptions. It skipped the progress lemmas that say the locks are eventually released and the loops terminate, and left a comment listing those missing steps. In both cases the agent knew what was missing, but could not produce it.
Undecomposed attempts mean the solver chokes. On Cahill SSI, Astra had a sound strategy, a ranking function, and it proved the supporting lemmas. Then it sent the entire inductive step to Z3 as a single obligation. Z3 said unknown, and the agent sent the same obligation again. Committing a transaction in that protocol can force other transactions to abort, while updating history, locks, and conflict flags. Each of those updates has to be shown to preserve the ranking argument. That is several pages of reasoning in one SMT query. The strategy was right, but it was not cut into pieces the solver could handle.
Abstraction wins. Cutting the obligation into pieces (decomposition) is not the only way to get the proof pass through the solver. Abstraction, in the modeling sense, asks what the property actually depends on and throws away everything orthogonal to it. Then the cases you would have argued one by one collapse into a single argument. Look at the two attempts at the ZooKeeper implementation. Terra reasoned directly over the implementation state, transaction origins and queued messages and synchronization state. It generated about 13,000 lines of intermediate proof, ran out of token budget, and proved neither leadership property. Astra first asked what leadership actually depends on, and found that a recorded vote and an eligible acknowledgment still in flight are the same thing: a claim of support for a leader. Once both are represented the same way, the synchronization and broadcast actions preserve the invariant for one common reason instead of a dozen separate ones, and both leadership properties follow. The level Astra chose to work at made the whole difference.
Bugs found
The specs in the benchmark are not guaranteed to be correct. They come from real systems, a few of them generated from source code, and most had been model checked a lot but never proved. Trying to prove them turned up 46 issues, 35 of which are now fixed. They came in three kinds.
The theorem was wrong. etcd Raft's LeaderCompletenessInv compared a leader's term against the term that created an entry, rather than the term that committed it. Raft allows an entry to be committed late, so the property as stated is false. The agent produced a 47-transition counterexample. A task can end this way, with a counterexample instead of a proof, as long as TLC or Apalache confirms the trace.
The model was wrong. SlateDB's WAL had a 58-step trace where garbage collection deletes a data entry, a delayed writer writes its fence into the vacated slot, and a writer replaying the log skips that fence and reaches READY without the deleted data. We reproduced the trace and reported it upstream. The fix validates the writer's epoch after replay, and on the revised model all four targets go through.
The configuration was hiding the problem. MongoDB's distributed transactions spec, one I wrote with Will Schultz, did not explicitly rule out a transaction starting at two routers with different read timestamps. The implementation rules this out, because a transaction stays pinned to the router that started it, and the spec took that as given instead of stating it. The model checking config used a single router, which supplied this assumption for free, so TLC was never in a position to notice, but the proof attempt called this assumption out explicitly.
Bounded model checking with a narrow config missed these. The proof attempt forced the question "why is this true in general?", and model checking with the right configuration produced the counterexample. Neither tool alone got there.
Proving gives you insight. A model checker can tell you when something breaks and hands you a trace. But a proof tells you why, and when the proof fails, it fails at a specific obligation, on a specific action, against a specific conjunct of the invariant. That points at the design assumption that is wrong, not just the symptom. Proofs are also incremental. TLAPS fingerprints the obligations it has already discharged, so after an edit only the affected steps need re-proving, and the ones that fail show which part of the argument the change broke. In contrast, a model checker reruns from scratch and hands you another trace.
Proofs people can follow
Another advantage of proof over model checking is that it leaves you with an inductive invariant, as a short statement of why the system works, and the lemmas get reused across targets and across revisions of the spec. This is awesome, but how readable are these? Sol's accepted max-effort proofs total over 15K lines. If agents produce proofs faster than engineers can follow them, the team incurs cognitive debt. You get a green checkmark backed by an argument nobody on the team can explain. So there is clear future work here: we need a user-friendly way to convey what a proof says. Surface the key invariants in plain language, tie each lemma to the design decision it relies on, and show which parts of the argument each action touches.