Stars
Forks
Watchers
Developer links
pgrust
pgrust gives you one PostgreSQL-compatible server for both transactions and fast analytics, with psql sessions, drivers, and ORMs working unchanged. Row storage or columnar: pick per table. The pgrcolumnar format keeps compressed column data with zone maps and background compaction, and still supports transactional writes, rollbacks, and WAL logging for crash recovery. Columnar tables accept B-tree, hash, GiST, SP-GiST, and GIN indexes. Updates and deletes are recorded as markers instead of rewriting stored data. The Gravity query engine runs DML with ON CONFLICT and RETURNING, triggers, cursors, PL/pgSQL, and COPY with Postgres semantics, and compiles query plans to machine code. A built-in scheduler lowers the priority of long-running queries, so heavy reports interfere less with quick lookups. One memory budget, sized from the machine, covers the buffer pool, columnar caches, and running queries; near the limit, pgrust cancels the statement using the most memory instead of letting the operating system kill the server. Extensions come bundled: pgvector, pg_cron, pg_stat_statements, pg_trgm, hstore, pgcrypto, and postgres_fdw. The Docker image mirrors the official postgres image's environment variables, init script folder, and data volume. A browser demo at pgrust.com/try runs queries before you install anything. It is beta software, so keep regular Postgres as the source of truth for critical data. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. AGPL-3.0 licensed.
Benefits
- Keep Your Postgres Tools
- Because pgrust speaks the Postgres wire protocol and SQL dialect, existing psql sessions, client drivers, and ORMs connect without code changes, so trying it needs no application rewrite.
- Row And Columnar Tables Together
- Choose heap row storage for transactions or the pgrcolumnar access method for analytics inside the same database, with MVCC snapshots, transactional rollback, and common index types.
- Fewer Out-Of-Memory Crashes
- A single memory budget covers the buffer pool, columnar caches, and running queries, and near the limit pgrust cancels the statement using the most memory instead of letting the OS kill the whole server.
- Try Before You Install
- A full pgrust server compiled to WebAssembly runs in your browser at pgrust.com/try, and the same release ships as tarballs or a multi-arch Docker image for amd64 and arm64.
Features
- Gravity Query Engine
- Vectorized, push-based executor that compiles plans to AArch64 or x86-64 machine code, or WebAssembly in the browser build, and interprets plans when compiling would not pay off.
- pgrcolumnar Storage
- Column-oriented table access method with dictionary encoding and compression, zone maps, delete vectors, background compaction, and a sorted_by table option, created with USING pgrcolumnar.
- Thread-Based Concurrency
- Connections and parallel query run on threads instead of processes, with work stealing that assigns idle threads to queries already in flight and a scheduler that deprioritizes long-running ones.
- Bundled Extensions
- Ships pgvector, pg_cron 1.6, pg_stat_statements, pg_trgm, hstore, pgcrypto, postgres_fdw, and most of contrib, though extensions built for stock Postgres do not load as-is.
- jsonb Planner Statistics
- ANALYZE gathers statistics on keys and values inside jsonb columns, so the planner can estimate filters using ->, ->>, #>, #>>, and the ?, ?|, ?& operators.
- Docker Drop-In Image
- The malisper/pgrust image honors POSTGRES_PASSWORD, POSTGRES_USER, POSTGRES_DB, PGDATA, init scripts in /docker-entrypoint-initdb.d, and the standard data volume. Use the v0.4-beta tag.