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 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 8:03:49 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

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

15 sources
Now that I have taken a closer look, the code looks significantly better than it seemed at first glance, though there are still peculiarities, and some drawbacks. An unfortunate aspect is that the code has become a bit more bloated in some regards due to usage of Result, instead of an implicit elog() macro and similar. Passing Result around, in some ways as an alternative to an unwinding exception, is cleaner in some ways, but it also bloats the code somewhat. The rewrite also could have simpler code in some cases, like https://github.com/malisper/pgrust/blob/3646a73515a5e4ac7d0b... could perhaps just be match syscache_seams::search_pg_class_full_form::call(ctx.mcx(), relationId)? { Some(form) => Ok(form.relhassubclass), None => { Err(ereport(ERROR) .errmsg(format!("cache lookup failed for rel
Read the rest
ation {relationId}")) .into_error()) } } but that is a smaller thing. I see a lot of MemoryContext. I am not sure how much that bloats the code (though the C code is bloated due to C's issues and problems, like re-using collections and such). Does it incur an overhead?
In Postgres rewritten in Rust, now passing 100% of the Postgres regression tests
This is impressive - but is a license change, from the PostgresQL license [0] to AGPL [1]. I like the AGPL and think it's the best truly free open source license, but I worry if this is compatible. Ie, if this is rewritten from the original source, should the original apply? (Yes.) There has been a trend to rewrite open source software with a more restrictive license (like coretools in Rust). This looks considerably more ethical by choosing the AGPL - I just wonder, safer with no change at all? [0] https://www.postgresql.org/about/licence/ [1] https://github.com/malisper/pgrust?tab=AGPL-3.0-1-ov-file
In Postgres rewritten in Rust, now passing 100% of the Postgres regression tests
The github cli has a command to query commits with a sorting asc/desc flag https://cli.github.com/manual/gh_search_commits here's the docs with more syntax using the "before x date" https://docs.github.com/en/search-github/searching-on-github... there's also an advanced search page, but it does not support commits when filtering with dates https://github.com/search/advanced or you can bisect the date in the search widget, this is the first day with a commit https://github.com/malisper/pgrust/commits/main/?since=2026-... first commit: https://github.com/malisper/pgrust/commit/22113dc36b02973060...
In Postgres rewritten in Rust, now passing 100% of the Postgres regression tests
How would one go about reviewing a piece of code like this? One of the things I'd typically do is peek at the commit history. Seeing what people worked on and how they did it tends to say a lot about a project. But with LLMs generating 7101 commits in less than a month that isn't feasible. Even looking at a single day is way too much [1]. It probably also doesn't make sense since the commits content won't tell you much anyway. ps. How do you easily get to the first commit in a repo on GitHub? Browsing commit history feels rather tedious [1] - https://github.com/malisper/pgrust/commits/main/?since=2026-...
In Postgres rewritten in Rust, now passing 100% of the Postgres regression tests
What a peculiar kind of rewrite. Rust: https://github.com/malisper/pgrust/blob/3646a73515a5e4ac7d0b... Original: https://github.com/postgres/postgres/blob/df293aed46e3133df3... Usage: https://github.com/malisper/pgrust/blob/3646a73515a5e4ac7d0b... The return type in the rewrite is both some sort of Error tagged union that supports the Try machinery in Rust; but, it also contains a boolean that apparently must be checked; or something. It seems labyrinthical and possibly broken and terrible.
In Postgres rewritten in Rust, now passing 100% of the Postgres regression tests

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.