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.

pdf-inspector: Fast Rust Library for PDF Classification and Text Extraction

pdf-inspector: Fast Rust Library for PDF Classification and Text Extraction

August 26, 2026

pdf-inspector is a high-performance Rust library designed for intelligent PDF processing. It excels at classifying PDFs as text-based or scanned, extracting text with position awareness, and converting content to clean Markdown. This library enables smart routing decisions, significantly reducing the need for expensive OCR services for many documents.

RustPDFText Extraction
Grok Build: SpaceXAI's AI Coding Agent and TUI for Developers

Grok Build: SpaceXAI's AI Coding Agent and TUI for Developers

August 25, 2026

Grok Build is SpaceXAI's powerful terminal-based AI coding agent, offering a full-screen TUI for interactive development. It is capable of understanding codebases, editing files, executing commands, and managing tasks efficiently. This tool enhances developer productivity, supporting interactive, headless, and embedded workflows.

RustAICLI
tmux-agent-sidebar: Real-time AI Agent Monitoring in tmux

tmux-agent-sidebar: Real-time AI Agent Monitoring in tmux

August 23, 2026

tmux-agent-sidebar is a powerful tmux plugin designed to monitor AI coding agents like Claude Code, Codex, and OpenCode across all your tmux sessions and windows. It provides real-time status updates, background shell states, prompts, and Git information, all within a convenient sidebar. This tool enhances productivity by centralizing agent activity and offering quick actions like spawning worktrees.

RusttmuxAI
Start-Technologies: Monorepo for StartOS and Self-Hosting Solutions

Start-Technologies: Monorepo for StartOS and Self-Hosting Solutions

August 13, 2026

Start-Technologies is the comprehensive monorepo by Start9Labs, featuring StartOS as its flagship product. This open-source Linux distribution enables users to run personal servers, facilitating the self-hosting of various services for enhanced data ownership and privacy. It integrates a robust Rust backend, an Angular frontend, and a unique diff-based database for reactive state synchronization.

open-sourceself-hostingpersonal-server

Source repository

Open the original repository on GitHub.

12 counted GitHub visits

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 ❤️