HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
malisper
pgrust
Rust2026–2026
malisper / pgrust

pgrust

Postgres rewritten in Rust, now faster than Postgres and Clickhouse

19Distinct people
39Mentions
2Explicit recommenders
5.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Postgres rewritten in Rust, now faster than Postgres and Clickhouse

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

Author here. Let me know if you have any questions about the post or about pgrust. Let me take a shot at answering what I think will be the most common question: how can I…

malisper used a recommendation phrase. 2 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

Why I will not be using LLMs in my coding direct repository linkDebated

The conversation debates the viability of LLMs in coding, contrasting arguments that they boost productivity with concerns about non-deterministic reliability and skill atrophy. Critics question the universal success claims of top programmers using AI, while others highlight the inherent unpredictability of LLM outputs as a fundamental flaw.

243 readable replies · Supporting reply 1 · Supporting reply 2

Mentions over time

HN mentions by week39 dated mentions

Observed mentions: 2026-05-01 20:29:24 UTC to 2026-10-25 02:27:07 UTC. Weeks start Monday, UTC.

0510152026-04-27 00:00:00 UTC to 2026-05-04 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsApr 272026-05-04 00:00:00 UTC to 2026-05-11 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2026-05-11 00:00:00 UTC to 2026-05-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-05-18 00:00:00 UTC to 2026-05-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-05-25 00:00:00 UTC to 2026-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-06-01 00:00:00 UTC to 2026-06-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-06-08 00:00:00 UTC to 2026-06-15 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-06-15 00:00:00 UTC to 2026-06-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-06-22 00:00:00 UTC to 2026-06-29 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2026-06-29 00:00:00 UTC to 2026-07-06 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2026-07-06 00:00:00 UTC to 2026-07-13 00:00:00 UTC (exclusive): 15 mentions; 1 submissions, 14 comments2026-07-13 00:00:00 UTC to 2026-07-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-20 00:00:00 UTC to 2026-07-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsJul 202026-07-27 00:00:00 UTC to 2026-08-03 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2026-08-03 00:00:00 UTC to 2026-08-10 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2026-08-10 00:00:00 UTC to 2026-08-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-08-17 00:00:00 UTC to 2026-08-24 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-08-24 00:00:00 UTC to 2026-08-31 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-08-31 00:00:00 UTC to 2026-09-07 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-09-07 00:00:00 UTC to 2026-09-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-09-14 00:00:00 UTC to 2026-09-21 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-09-21 00:00:00 UTC to 2026-09-28 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-09-28 00:00:00 UTC to 2026-10-05 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-10-05 00:00:00 UTC to 2026-10-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-10-12 00:00:00 UTC to 2026-10-19 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2026-10-19 00:00:00 UTC to 2026-10-26 00:00:00 UTC (exclusive): 7 mentions; 0 submissions, 7 commentsOct 19

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Apr 272026-04-27 00:00:00 UTC2026-05-04 00:00:00 UTC101
May 42026-05-04 00:00:00 UTC2026-05-11 00:00:00 UTC202
May 112026-05-11 00:00:00 UTC2026-05-18 00:00:00 UTC000
May 182026-05-18 00:00:00 UTC2026-05-25 00:00:00 UTC000
May 252026-05-25 00:00:00 UTC2026-06-01 00:00:00 UTC000
Jun 12026-06-01 00:00:00 UTC2026-06-08 00:00:00 UTC000
Jun 82026-06-08 00:00:00 UTC2026-06-15 00:00:00 UTC101
Jun 152026-06-15 00:00:00 UTC2026-06-22 00:00:00 UTC000
Jun 222026-06-22 00:00:00 UTC2026-06-29 00:00:00 UTC110
Jun 292026-06-29 00:00:00 UTC2026-07-06 00:00:00 UTC303
Jul 62026-07-06 00:00:00 UTC2026-07-13 00:00:00 UTC15114
Jul 132026-07-13 00:00:00 UTC2026-07-20 00:00:00 UTC000
Jul 202026-07-20 00:00:00 UTC2026-07-27 00:00:00 UTC000
Jul 272026-07-27 00:00:00 UTC2026-08-03 00:00:00 UTC211
Aug 32026-08-03 00:00:00 UTC2026-08-10 00:00:00 UTC303
Aug 102026-08-10 00:00:00 UTC2026-08-17 00:00:00 UTC000
Aug 172026-08-17 00:00:00 UTC2026-08-24 00:00:00 UTC101
Aug 242026-08-24 00:00:00 UTC2026-08-31 00:00:00 UTC000
Aug 312026-08-31 00:00:00 UTC2026-09-07 00:00:00 UTC000
Sep 72026-09-07 00:00:00 UTC2026-09-14 00:00:00 UTC000
Sep 142026-09-14 00:00:00 UTC2026-09-21 00:00:00 UTC000
Sep 212026-09-21 00:00:00 UTC2026-09-28 00:00:00 UTC000
Sep 282026-09-28 00:00:00 UTC2026-10-05 00:00:00 UTC101
Oct 52026-10-05 00:00:00 UTC2026-10-12 00:00:00 UTC000
Oct 122026-10-12 00:00:00 UTC2026-10-19 00:00:00 UTC202
Oct 192026-10-19 00:00:00 UTC2026-10-26 00:00:00 UTC707

What Hacker News says

39 sources
we don't have the commits we need to audit the first commit has 400k files, the other two more than 1000 each, if you are going to ask others to audit this scale of ai generated code, can you tell us what you have done to audit it? What I have seen is your Ai adding a lint test to make sure it doesn't cheat again. Are you personally aware of this file? How can you ensure it doesn't alter it and reinject the hand rolled benchmark queries? Will you be reviewing changes more thoroughly going forward? https://github.com/malisper/pgrust/blob/38634b408dea373f3944... transparency is the way to end the controversy, which appears to be sharing the full commit history based on HN responses For clarity, I do not think you personally cheated or did anything nefarious. This is more another example in the "too much eyes free coding" columnar database.
In We should be more ambitious with the software we build
Hi! I'm the creator of pgrust. Let me explain what happened. For the most part, the actual accusations are false. This submission was an earlier version of pgrust 0.4 called pgrust 0.4-preview. We just open-sourced a newer version called pgrust 0.4-beta yesterday, and you can fully audit it here[0]. Rather than contest the accusations on GitHub, we figured it would be easier to complete pgrust 0.4 and open-source it to show that we're being honest. You can also verify what I'm saying yourself against the 0.4-preview binary we submitted to ClickBench here[1]. I don't have a way to prove this is the exact binary submitted, but if ClickHouse provided the SHA of the binary they tested against, it would match. The three main accusations boil down to: 1) We used handwritten code optimized against each query in the benchmark, 2) We cached the re
Read the rest
sults between query runs, and 3) We didn't support queries outside of the 43 ClickBench queries. First, we did not use handwritten queries. The code Alexey pointed out does not run during the benchmark. The design of 0.4 relies on a JIT compiler that compiles your SQL to a Lisp-based intermediate representation that we call Gravity IR that we then convert to x86 and ARM assembly. While developing 0.4, I wrote handwritten code against the IR for benchmarking purposes. The idea was that if queries written in our IR are fast, and we can compile good enough IR fast, then our new query engine will be fast. This is also the reason the directory those "kernels" are in is called "irprobe" - it was a probe of our IR to make sure it was fast. Our 0.4-preview submission went through the pipeline: SQL query -> Gravity IR -> assembly. Second, the "result-cache" Alexey observed is the result of a cache we use to cache which predicates match which strings in our dictionaries we use for dictionary compression. Alexey wasn't aware of this cache and assumed we were just caching the query results. On ClickBench you are allowed to use caches like this that hold intermediate data[2]. ClickHouse has its own cache similar to this called the Condition Cache[3]. In our newest submission, we were upfront about all the caching we do and how to disable each cache[4]. The third claim that we didn't support other queries outside of the 43 ClickBench queries is partially false, but does have some ground to it. As I said before, pgrust 0.4-preview was an early version of pgrust 0.4. Once our new JIT compiler supported enough SQL to handle the ClickBench queries, we decided to submit it to ClickBench. AFAIK, ClickBench has no rules about how much SQL you need to support. On top of that, we did ship that we did ship 0.4-preview with our old query engine. It would have been a two-line change to fall back to it and support a much broader set of queries outside what our new engine could support. Those queries would still be fast, but not quite as fast as our new engine was. Our new 0.4-beta release does now support all Postgres SQL (minus some bugs around CTEs and MERGE) To sum up, pgrust 0.4-preview was an early build of pgrust 0.4 while it was in development. It was a real query engine and actually executed queries. I acknowledge that we submitted it prematurely, when it supported a narrow set of SQL, and we should have ensured broader SQL coverage before submitting it. With our new submission that solves these problems, and we're hoping for pgrust to be reinstated. If there's anything off about the submission, please point it out and we're happy to fix it. [0] https://github.com/malisper/pgrust/releases/tag/v0.4-beta [1] https://pgrust.com/downloads/archive/2026-09-clickbench-snap... [2] https://github.com/ClickHouse/ClickBench/blob/main/README.md [3] https://clickhouse.com/docs/concepts/features/performance/ca... [4] https://github.com/ClickHouse/ClickBench/pull/2751
In Remove pgrust: the entry is cheating (per-query kernels and result caching)
If the Ai came back to me with a 1600x improvement (still in pgrust readme), I would be highly suspicious of the Ai and the code it wrote The hype factory must grow, I suppose, though I would prefer if the model makers would stop with this "complete the task by any and every means possible" and replace it with "I don't know, I should ask or do more learning" At least they have added a test which looks to make sure the Ai doesn't do it again... if you need this kind of test, something is wrong https://github.com/malisper/pgrust/blob/38634b408dea373f3944...
In Remove pgrust: the entry is cheating (per-query kernels and result caching)
> What does "rebuild" mean? Translation from C to Rust? We translated from C to Rust, rearchitected several components and are working on rearchitecting more. For instance, we replaced the process-per-connection model with a thread-per-connection model and added a columnar format + new query executor that's hundreds of times faster than Postgres for OLAP workloads. > without mentioning Postgres authors We have a NOTICE file which references the Postgres license here: https://github.com/malisper/pgrust/blob/main/NOTICE
In Postgres 19 delayed after AI reviewers find more bugs than humans can fix
I have a unique perspective on this as I've been working on rewriting and rearchitecting Postgres to solve a lot of the long standing issues Postgres has[0][1]. If I had to root cause why we're finding so many bugs now, I would attribute it to the limited Postgres test suite. AI is merely uncovering bugs that already existed. For the most part, Postgres relies on individual regression tests to test each feature. While regression tests are great for making sure features don't break (yes, SELECT 'Hello, World' LIKE '%Hello%' still returns true), they actually aren't that great hitting the edge cases (passing a string that's over 2MB to a specific function will trigger a buffer overflow and crash your DB). The main way Postgres has prevented bugs in the past has been by minimizing risky changes and having lots of human review. As we're learn
Read the rest
ing now, there were lots of gaps that were not caught by the existing process. While the Postgres team is skeptical of AI, I've had lots of success in using AI to scale more advanced forms of testing such as Deterministic Simulation Testing, differential coverage guided fuzzing, and formal verification. To put it in perspective, in the process of doing testing for pgrust, I've uncovered ~50 different bugs in core Postgres. The bugs I'm finding aren't through AI review, but are instead through using AI to do more advanced testing than regression testing. All of the techniques I'm using existed existed pre-AI, but aren't used in meaningful capacity as part of the core Postgres development. Right now I'm going all in on formal verification. I wrote a compiler to translate C and Rust functions to Lean and am then having an LLM write a proof that the two functions are identical. So far I've been able to verify 10.5% of the codebases behave identically (10.5% = 67k/640k LOC of Postgres). I'm finding details as minute as a parsing function where Postgres trimmed spaces using isspace() and pgrust only trimmed ascii whitespaces. These aren't cases you would find with traditional regression testing or human review. The thoroughness of the types of bugs I'm finding is giving me confidence that that this is catching more bugs than any sort of manual testing could. I don't currently see any reason that I won't be able to scale up the formal verification to cover 100% of the codebase. The only issue is it takes a long time to do. [0] https://github.com/malisper/pgrust [1] https://malisper.me/the-four-horsemen-behind-thousands-of-po...
In Postgres 19 delayed after AI reviewers find more bugs than humans can fix
> My understanding is that they used c2rust, and then told the LLM/Agents to make the code more idiomatic rust, while also using the PG test suite as a feedback mechanism. This is correct > and thus a fork, and should thus have the original license and copyright preserved) This is not correct. The Postgres license is permissive. We need to include a copy of the license (which we do in the NOTICE file[0]) but we CAN relicense the Postgres code however we want as long as we meet the requirements of the license. pgrust is a derived work of Postgres, but Postgres allows derived works to be under a different license. [0] https://github.com/malisper/pgrust/blob/main/NOTICE
In Making Postgres 300x faster for analytics: batching, operator fusion, and SIMD
malisper·Aug 7, 2026Recommendation phrase
Author here. Let me know if you have any questions about the post or about pgrust. Let me take a shot at answering what I think will be the most common question: how can I trust pgrust? Our #1 priority right now is correctness. Over the past two weeks, I've done a mix of formal verification and differential fuzz testing. We've been able to prove over 1000 user facing functions have the exact same logic in both pgrust and postgres (see the proofs directory if you're curious). For cases where formal verification is not easy, we've taken the c implementation of a function and the rust implementation of a function and ran millions of inputs through each of them and confirmed they gave the same results every time. We've only covered about 15% of the surface area so far, but in the process, we've discovered ~100 bugs in pgrust and ~20 bugs in P
Read the rest
ostgres itself. My favorite postgres bug we found is this one[0]. Postgres has a quadtree implementation. Due to floating point rounding, it was possible for a point to be neither above, nor below, nor even with the center point of the quadtree. We've also entered engagements with Antithesis[1] to do Jepsen style fault testing and Aretta[2] to do more serious formal verification. If you want to support the project, the easiest way is to give us a star on GitHub[3] [0] https://www.postgresql.org/message-id/19597-39c532e61d78dff6... [1] https://antithesis.com/ [2] https://aretta.ai/ [3] https://github.com/malisper/pgrust
In Making Postgres 300x faster for analytics: batching, operator fusion, and SIMD
main indeed has two commits, but it clearly states the location of the rest of the commits, so I wouldn't be critical of main itself. hey claude, do a breakthrough You can find the actual git history at the v0.2 github tag. Co-Authored-By: Fable <noreply@anthropic.com> Now we see https://github.com/malisper/pgrust/tree/v0.2 has almost 6000 commits in it, with the very first one on 2026-07-02. That's a lot of token momentum! It's easy to claim AI slop nowadays, but you should still mistrust-but-verify.
In Making Postgres 300x faster for analytics: batching, operator fusion, and SIMD

Showing the 15 most recent of 39 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.