Meet 'pgrust': The AI-Transpiled, Rust-Based Engine Achieving 100% Core Compatibility with PostgreSQLIn an audacious display of AI-assisted systems engineering, Michael Malis, the technical founder of data privacy startup Freshpaint, has unveiled pgrust. The ambitious open-source project aims to entirely rewrite the monolithic C codebase of PostgreSQL into Rust. Instead of manual labor, Malis utilized large language models to methodically ingest legacy PostgreSQL code, interpret its structural logic, and transpile it into memory-safe Rust. The end result is an entirely new database engine engineered from the ground up to remain thoroughly wire-compatible with existing PostgreSQL deployments.
Currently, pgrust boasts 100% behavioral parity with PostgreSQL 18.3. Developers can deploy pgrust directly onto existing legacy PostgreSQL database files and execute complex queries immediately with zero syntax errors or schema mutations. Proving its strict structural integrity, the project has successfully passed all 46,000 regression test suites native to the official PostgreSQL distribution.
Despite achieving flawless compatibility, Malis noted that the current iteration of pgrust suffers from a performance deficit, running slower than legacy C-based PostgreSQL. However, the architecture is rapidly evolving. Malis revealed that he is currently engineering a next-generation runtime iteration laser-focused on raw performance optimization. He projects that the upcoming version will deliver a 50% performance increase in transactional workflows (OLTP). More impressively, by implementing a specialized columnar storage framework and batched vectorization, Malis believes pgrust can accelerate analytical workloads (OLAP) by 300x, effectively outpacing dedicated analytical engines like ClickHouse.
For developers eager to test the technology, pgrust leverages its native Rust architecture to compile directly into WebAssembly (WASM), allowing users to launch and benchmark an active instance inside a standard web browser sandbox.
The pgrust Architecture Blueprint
The Creator: Michael Malis (Founder of Freshpaint).
The Core Innovation: An AI-transpiled, memory-safe Rust engine built directly from the source logic of PostgreSQL.
Compatibility Status: 100% drop-in compatibility with PostgreSQL 18.3; can natively read existing Postgres data directories.
Validation Milestone: Successfully validated against 46,000+ native PostgreSQL regression tests.
Current Performance Limitation: Raw query execution speed is currently lower than original C-based PostgreSQL.
The Velocity Roadmap:
Transactional (OLTP): Projected 50% speed increase via Rust runtime optimizations.
Analytical (OLAP): Projected 300x performance leap via column-store extensions and vectorized batch execution (aiming to outperform ClickHouse).
Web Sandbox: Computes natively into WebAssembly (WASM) for immediate browser-based testing.
A classic problem with old C-based system software is the persistent memory leaks and buffer overflows, posing serious security vulnerabilities. The revival of Postgres in Rust by pgrust means the system automatically gains memory safety and fearless concurrency features right from the compiler level. This is the direction that global giants like Microsoft, Google, and AWS are heavily promoting today.
Typically, when using AI to write complex code, we fear "AI hallucinations," or code that looks good but malfunctions. However, pgrust's ability to run all 46,000 Postgres regression tests serves as a crucial milestone in the technology world: "If we have a robust test suite, we can achieve anything." "We will be able to use AI as the primary workforce to securely and 100% translate massive amounts of legacy codebases into new languages." This trend is poised to become a massive market for rewriting old systems worldwide.
The plan for speeding up columnar and batch processing: Normally, PostgreSQL is a row-oriented database, excellent for transactional processing (OLTP) such as shopping cart systems, but very slow when calculating sales statistics of millions of rows (OLAP). This forces most offices to migrate their data to a separate ClickHouse database. The fact that pgrust is integrating column-store capabilities and challenging ClickHouse means they are building what is called HTAP (Hybrid Transactional/Analytical Processing). If successful as they claim, pgrust will become a universal database that organizations worldwide will take notice of, eliminating the need to run two separate database servers.
OpenAI Apps Chief Fidji Simo Steps Down Due to Health Battle
Source: pgrust
Meet 'pgrust': The AI-Transpiled, Rust-Based Engine Achieving 100% Core Compatibility with PostgreSQLIn an audacious display of AI-assisted systems engineering, Michael Malis, the technical founder of data privacy startup Freshpaint, has unveiled pgrust. The ambitious open-source project aims to entirely rewrite the monolithic C codebase of PostgreSQL into Rust. Instead of manual labor, Malis utilized large language models to methodically ingest legacy PostgreSQL code, interpret its structural logic, and transpile it into memory-safe Rust. The end result is an entirely new database engine engineered from the ground up to remain thoroughly wire-compatible with existing PostgreSQL deployments.
Currently, pgrust boasts 100% behavioral parity with PostgreSQL 18.3. Developers can deploy pgrust directly onto existing legacy PostgreSQL database files and execute complex queries immediately with zero syntax errors or schema mutations. Proving its strict structural integrity, the project has successfully passed all 46,000 regression test suites native to the official PostgreSQL distribution.
Despite achieving flawless compatibility, Malis noted that the current iteration of pgrust suffers from a performance deficit, running slower than legacy C-based PostgreSQL. However, the architecture is rapidly evolving. Malis revealed that he is currently engineering a next-generation runtime iteration laser-focused on raw performance optimization. He projects that the upcoming version will deliver a 50% performance increase in transactional workflows (OLTP). More impressively, by implementing a specialized columnar storage framework and batched vectorization, Malis believes pgrust can accelerate analytical workloads (OLAP) by 300x, effectively outpacing dedicated analytical engines like ClickHouse.
For developers eager to test the technology, pgrust leverages its native Rust architecture to compile directly into WebAssembly (WASM), allowing users to launch and benchmark an active instance inside a standard web browser sandbox.
The pgrust Architecture Blueprint
The Creator: Michael Malis (Founder of Freshpaint).
The Core Innovation: An AI-transpiled, memory-safe Rust engine built directly from the source logic of PostgreSQL.
Compatibility Status: 100% drop-in compatibility with PostgreSQL 18.3; can natively read existing Postgres data directories.
Validation Milestone: Successfully validated against 46,000+ native PostgreSQL regression tests.
Current Performance Limitation: Raw query execution speed is currently lower than original C-based PostgreSQL.
The Velocity Roadmap:
Transactional (OLTP): Projected 50% speed increase via Rust runtime optimizations.
Analytical (OLAP): Projected 300x performance leap via column-store extensions and vectorized batch execution (aiming to outperform ClickHouse).
Web Sandbox: Computes natively into WebAssembly (WASM) for immediate browser-based testing.
A classic problem with old C-based system software is the persistent memory leaks and buffer overflows, posing serious security vulnerabilities. The revival of Postgres in Rust by pgrust means the system automatically gains memory safety and fearless concurrency features right from the compiler level. This is the direction that global giants like Microsoft, Google, and AWS are heavily promoting today.
Typically, when using AI to write complex code, we fear "AI hallucinations," or code that looks good but malfunctions. However, pgrust's ability to run all 46,000 Postgres regression tests serves as a crucial milestone in the technology world: "If we have a robust test suite, we can achieve anything." "We will be able to use AI as the primary workforce to securely and 100% translate massive amounts of legacy codebases into new languages." This trend is poised to become a massive market for rewriting old systems worldwide.
The plan for speeding up columnar and batch processing: Normally, PostgreSQL is a row-oriented database, excellent for transactional processing (OLTP) such as shopping cart systems, but very slow when calculating sales statistics of millions of rows (OLAP). This forces most offices to migrate their data to a separate ClickHouse database. The fact that pgrust is integrating column-store capabilities and challenging ClickHouse means they are building what is called HTAP (Hybrid Transactional/Analytical Processing). If successful as they claim, pgrust will become a universal database that organizations worldwide will take notice of, eliminating the need to run two separate database servers.
OpenAI Apps Chief Fidji Simo Steps Down Due to Health Battle
Source: pgrust
Comments
Post a Comment