malisper/pgrust

Postgres rewritten in Rust, now passing 100% of the Postgres regression tests

pgrust

A Postgres rewrite in Rust.

github.com/malisper/pgrust/raw/main/LICENSEBrowser demo |Discord |Get pgrust updates |Issues

pgrust targets compatibility with Postgres 18.3 and matches Postgres's expected output across more than 46,000 regression queries.

pgrust is disk compatible with Postgres and can boot from an existing Postgres 18.3 data directory.

The goal is to make Postgres easier to change from the inside: keep the behavior Postgres-shaped, keep the real Postgres tests as the oracle, and use Rust plus AI-assisted programming to explore deeper server changes.

Update: We're working on a new not yet published version of pgrust that currently passes 100% of Postgres regression suite, has a thread per connection model instead of process per connection, is 50% faster than Postgres on transaction workloads, and is ~300x faster than Postgres on analytical workloads (2x slower than Clickhouse on clickbench and we think it can get faster than Clickhouse). Follow pgrust or join our Discord for updates!

Follow pgrust

Get project updates by email, including new releases, compatibility milestones, and architecture experiments.

Status

pgrust is not production-ready yet. It is not performance optimized yet.

Existing Postgres extensions and procedural language extensions such as PL/Python, PL/Perl, and PL/Tcl are not generally compatible yet. Some bundled contrib modules are already ported, and more compatibility may be possible over time.

Roadmap

• multithreaded Postgres internals

• built-in connection pooling

• better JSON-heavy workload support

• fast forking and branching workflows

• storage experiments, including no-vacuum designs

• runtime guardrails for bad queries and AI-generated SQL

• fewer sudden bad plan switches

Try It

Try the WebAssembly demo at pgrust.com.

Docker:

This uses the psql client inside the Docker image.

malisper/pgrust:latest currently points at the same release, but v0.1 is the pinned launch image.

Build From Source

macOS:

Debian/Ubuntu:

Build:

Create a data directory:

Run pgrust:

Connect:

Regression Tests

Run the Postgres regression tests against pgrust:

The runner uses pgrust's own --initdb plus the vendored Postgres 18.3 test files in this repository. It needs a Postgres 18 psql client on PATH; if psql is somewhere else, set PGRUST_PSQL=/path/to/psql.

Verified launch result: pgrust matched Postgres's expected output across more than 46,000 regression queries.

History

This repository now contains the newer pgrust implementation that reached the regression-test milestone.

The older public implementation is archived on archive/pre-fabled-2026-06-23.

Background:

• Original pgrust launch: malisper.me/pgrust-rebuilding-postgres-in-rust-with-ai

• 67% regression update: malisper.me/pgrust-update-at-67-postgres-compatibility-and-accelerating

• Four Horsemen roadmap: malisper.me/the-four-horsemen-behind-thousands-of-postgres-outages

Feedback

Please open an issue if something breaks, if setup is confusing, or if there is a Postgres improvement you want to see first.

Contact

• Email: maintainers@pgrust.com

• Discord: discord.gg/FZZ4dbdvwU

• Project updates: pgrust.com

License

pgrust is licensed under AGPL-3.0. See LICENSE.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论