Skip to main content

A 2.5x faster Postgres parser with Claude Code

· 12 min read
Manan Gupta
Founding Engineer, Multigres

Building a production-grade parser is an exercise in discipline. You need to translate thousands of grammar rules exactly. You need to catch subtle bugs that only surface on edge cases you've never seen. You need to verify every decision against a reference implementation. There are no shortcuts.

I know this because I've done it before. I led the effort to build the MySQL parser for Vitess. That took over a year with help from talented contributors. So when we needed a Postgres parser for Multigres, I expected a similar timeline.

It took eight weeks. 287,786 lines of code. 304 files. 130 commits. 71.2% test coverage. 2.5x faster than the cgo (Go's C interop) alternative.

Generalized Consensus: Recap

· 10 min read
Sugu Sougoumarane
Creator of Multigres, Vitess

We covered a lot of ground in this series. We started with the following objectives:

  • Propose an alternate and more approachable definition of consensus.
  • Expand the definition into concrete requirements.
  • Break the problem down into goal-oriented rules.
  • Provide algorithms and approaches to satisfy the rules with adequate explanations to prove correctness and safety.
  • Show that existing algorithms are special cases of this generalization.

Below is a summary of the topics we covered.