whatisgithub

What is pgrust?

malisper/pgrust — explained in plain English

Analysis updated 2026-05-18

3,699RustAudience · developerComplexity · 5/5LicenseSetup · hard

In one sentence

An in-progress rewrite of the Postgres database in Rust that already matches real Postgres output on over 46,000 regression tests, aiming for deeper changes than the original C codebase allows.

Mindmap

mindmap
  root((repo))
    What it does
      Rewrites Postgres in Rust
      Matches Postgres regression tests
      Reads real Postgres data
      AI assisted development
    Tech stack
      Rust
      Postgres 18.3
      Docker
    Use cases
      Database internals research
      Postgres compatible experiments
    Audience
      Database engineers
      Rust developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Explore an experimental Rust based rewrite of Postgres for research.

USE CASE 2

Run the WebAssembly demo to try pgrust directly in a browser.

USE CASE 3

Boot pgrust from an existing Postgres 18.3 data directory.

USE CASE 4

Run the built in regression test suite against a pgrust build.

What is it built with?

RustPostgresDocker

How does it compare?

malisper/pgrusttouchhle/touchhlekamiyaa/joshuto
Stars3,6993,6993,698
LanguageRustRustRust
Setup difficultyhardeasyeasy
Complexity5/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Building from source needs several system libraries and Rust's cargo toolchain.

AGPL-3.0 licensed, meaning any modified version used over a network must also have its source code shared.

So what is it?

pgrust is an ambitious attempt to rewrite Postgres, one of the most widely used databases in the world, in the Rust programming language. Rather than being a brand new database with its own behavior, the goal is for pgrust to act exactly like real Postgres. It targets compatibility with Postgres version 18.3 and its output already matches real Postgres across more than 46,000 of Postgres's own regression test queries. It is also disk compatible, meaning it can start up using a data directory created by an actual Postgres installation. The motivation behind the project is that Postgres is written in C, an older language that makes certain kinds of changes slow and risky. By rewriting it in Rust and using AI assisted programming to help explore deeper changes to the server, the authors want to make it easier to experiment with things like true multithreading instead of Postgres's one process per connection model, built in connection pooling, and storage designs that avoid the need for vacuuming. The README also mentions an unreleased newer version that reportedly passes all of the regression suite, uses a thread per connection model, and is significantly faster than standard Postgres on both everyday transactions and heavy analytical queries. The project is explicit that it is not production ready and not yet performance tuned, and that many existing Postgres extensions, including procedural language extensions, are not compatible yet. You can try it through a browser based WebAssembly demo, through a prebuilt Docker image, or by building it from source on macOS or Debian based Linux using Rust's build tool, cargo, along with several system libraries. Once built, it includes its own regression test runner that checks its behavior against the same test suite real Postgres uses. pgrust is written in Rust, has 3,699 stars on GitHub, and is licensed under AGPL-3.0. The project maintains a Discord community and a mailing list for people who want to follow its progress toward becoming a usable Postgres replacement.

Copy-paste prompts

Prompt 1
Walk me through building pgrust from source on my operating system.
Prompt 2
Explain how pgrust achieves disk compatibility with real Postgres.
Prompt 3
Help me run the Postgres regression test suite against this build.
Prompt 4
Show me how the Docker image for pgrust is set up and run.

Frequently asked questions

What is pgrust?

An in-progress rewrite of the Postgres database in Rust that already matches real Postgres output on over 46,000 regression tests, aiming for deeper changes than the original C codebase allows.

What language is pgrust written in?

Mainly Rust. The stack also includes Rust, Postgres, Docker.

What license does pgrust use?

AGPL-3.0 licensed, meaning any modified version used over a network must also have its source code shared.

How hard is pgrust to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is pgrust for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.