pgrust: Postgres Rewritten in Rust, Passing All Regression Tests

This repository profile is provided by osrepos.com, an open source repository discovery platform.

pgrust: Postgres Rewritten in Rust, Passing All Regression Tests

Summary

pgrust is an ambitious project rewriting Postgres in Rust, now successfully passing 100% of Postgres regression tests. It aims for compatibility with Postgres 18.3 and offers significant performance improvements, especially for transaction and analytical workloads. This project focuses on making internal changes easier while maintaining Postgres behavior and disk compatibility.

Repository Information

Analyzed by OSRepos on July 11, 2026

Topics

Click on any tag to explore related repositories

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Introduction

pgrust is a groundbreaking project that re-implements the PostgreSQL database in Rust. It targets full compatibility with Postgres 18.3 and has achieved a significant milestone, passing 100% of the Postgres regression test suite. The project's core goal is to simplify internal modifications to Postgres, leveraging Rust's safety and performance, along with AI-assisted programming, to explore deeper server changes. pgrust is also disk compatible with Postgres, allowing it to boot from existing Postgres 18.3 data directories. An upcoming version promises a thread-per-connection model, 50% faster transaction workloads, and ~300x faster analytical workloads compared to Postgres.

Installation

You can try pgrust using Docker or by building it from source.

Docker:

To quickly run pgrust with Docker, use the following commands:

docker run -d --name pgrust -e POSTGRES_PASSWORD=secret malisper/pgrust:v0.1 && until docker exec -e PGPASSWORD=secret pgrust psql -h 127.0.0.1 -U postgres -c '\q' >/dev/null 2>&1; do sleep 1; done && docker exec -it -e PGPASSWORD=secret pgrust psql -h 127.0.0.1 -U postgres; docker rm -f pgrust

This command will start a pgrust container, wait for it to be ready, connect using psql inside the container, and then remove the container.

Build From Source (macOS):

First, install dependencies:

brew install icu4c openssl@3 libpq

export LIBRARY_PATH="$(brew --prefix openssl@3)/lib:${LIBRARY_PATH:-}"
export PKG_CONFIG_PATH="$(brew --prefix openssl@3)/lib/pkgconfig:$(brew --prefix icu4c)/lib/pkgconfig:${PKG_CONFIG_PATH:-}"
export PATH="$(brew --prefix libpq)/bin:$PATH"

Build From Source (Debian/Ubuntu):

Install dependencies:

sudo apt-get update
sudo apt-get install -y build-essential pkg-config libicu-dev libssl-dev libldap2-dev libpam0g-dev postgresql-client-18

Build pgrust:

PGRUST_PGSHAREDIR="$PWD/vendor/postgres-18.3/share" \
cargo build --release --locked --bin postgres

Examples

After building from source, you can create a data directory and run pgrust.

Create a data directory:

target/release/postgres --initdb \
  -D /tmp/pgrust-data \
  -L "$PWD/vendor/postgres-18.3/share" \
  --no-locale \
  --encoding UTF8 \
  -U postgres

Run pgrust:

ulimit -s 65520

RUST_MIN_STACK=33554432 target/release/postgres \
  -D /tmp/pgrust-data \
  -F \
  -c listen_addresses= \
  -k /tmp \
  -p 5432 \
  -c io_method=sync \
  -c max_stack_depth=60000

Connect to pgrust:

psql -h /tmp -p 5432 -U postgres -d postgres \
  -c "select version(), 1 + 1 as two"

You can also try the WebAssembly demo directly in your browser.

Why Use pgrust?

pgrust offers a fresh perspective on database development, aiming to overcome some of the traditional challenges with Postgres internals. Its roadmap includes exciting features like multithreaded Postgres internals, built-in connection pooling, improved JSON workload support, fast forking and branching workflows, and storage experiments with no-vacuum designs. By rewriting Postgres in Rust, the project seeks to enhance performance, maintainability, and introduce innovative features that are harder to implement in the original C codebase. While not yet production-ready, its progress in passing all regression tests and demonstrating significant speedups makes it a project to watch for future database solutions.

Links

Related repositories

Similar repositories that may be relevant next.

OpenLogi: A Native, Local-First Logitech Options+ Alternative in Rust

OpenLogi: A Native, Local-First Logitech Options+ Alternative in Rust

June 1, 2026

OpenLogi is a native, local-first alternative to Logitech Options+, built with Rust. It allows users to remap mouse buttons, control DPI, and manage SmartShift functionality over HID++ without requiring an account or collecting telemetry. This project prioritizes privacy and local control for Logitech mouse users.

RustLogitechMouse Remapping
RustTraining: Comprehensive Learning Paths for Rust Programmers

RustTraining: Comprehensive Learning Paths for Rust Programmers

May 29, 2026

Microsoft's RustTraining repository offers a comprehensive collection of learning materials designed for Rust programmers of all levels. It provides seven structured training courses, covering topics from foundational concepts for various programming backgrounds to deep dives into async Rust, advanced patterns, and engineering practices. This resource aims to consolidate scattered knowledge into a cohesive and pedagogically sound learning experience.

RustProgrammingTraining
OpenHuman: Your Private, Powerful AI Super Intelligence

OpenHuman: Your Private, Powerful AI Super Intelligence

May 27, 2026

OpenHuman is an open-source, agent-based personal AI assistant built with Rust, designed for privacy, simplicity, and power. It integrates seamlessly into your daily workflow, offering local knowledge management, extensive third-party integrations, and advanced memory capabilities. This project aims to provide a personal AI that truly understands and remembers your context from day one.

RustAIPersonal AI
Tokio: An Asynchronous Runtime for Reliable Rust Applications

Tokio: An Asynchronous Runtime for Reliable Rust Applications

April 27, 2026

Tokio is a powerful asynchronous runtime for the Rust programming language, enabling developers to build fast, reliable, and scalable applications. It provides essential components like I/O, networking, scheduling, and timers, making it ideal for high-performance concurrent systems.

Rustasynchronousnetworking

Source repository

Open the original repository on GitHub.

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️