Test a Rust-based Postgres engine in your browser
Open a server running directly in your browser to experience the speed of analytical queries. pgrust is a database that rewrites Postgres C code in Rust, applying modern memory management and parallel processing structures. It supports existing Postgres clients and SQL syntax, allowing you to test the performance of the new engine without modifying existing applications.
v0.4-beta: Gravity engine and columnar storage
The recently released v0.4-beta version introduces the Gravity engine, a new vectorized JIT compiler. This engine processes analytical queries up to three times faster than ClickHouse while adhering to Postgres semantics for DML, triggers, and PL/pgSQL. The pgrcolumnar column-based storage has also matured, supporting compression and deletion vectors with transaction rollback capabilities. Memory management has been improved so that when system memory is low, the system cancels the query using the most memory instead of the operating system terminating the server.
Design targeting the main causes of Postgres failures
pgrust addresses the main causes of Postgres failures, memory exhaustion and heavy queries, with two core features. The automatic memory manager treats the buffer pool, column cache, and running queries as a single budget to prevent server downtime caused by the OOM Killer. The query scheduler lowers the priority of long-running queries to reduce latency for lightweight queries blocked by heavy ones. This structure is implemented using a thread-based concurrency model instead of Postgres's process-based model.
Installation and execution
The easiest way to run pgrust is to execute the WebAssembly-compiled server in your browser via pgrust.com. To run it locally, download and extract the v0.4-beta release tarball. This package includes bin/postgres, bin/initdb, and bin/psql, allowing it to operate independently without an existing PostgreSQL installation. Linux requires glibc 2.34 or higher, and macOS requires version 11 or higher. The Docker image malisper/pgrust can replace existing Postgres containers using the same environment variables and volume settings. If downloaded via a browser on macOS, Gatekeeper may block it, so you should download it using curl or remove the quarantine flag with the xattr command.
Reliability and limitations
pgrust is still in beta, and its use in production environments is not recommended. The team prioritizes testing and stability, formally verifying 1,397 of Postgres's 3,400 user-facing functions with Kani and conducting simulation tests with Antithesis. PostgreSQL extensions do not work by default due to the lack of a stable ABI, but major extensions like pgvector and pg_cron are built-in. In environments where data loss is not acceptable, you should still use existing Postgres as the source, and column tables created in v0.3 are not usable in v0.4-beta, requiring a dump and restore.