BuildTube Preview About
Back to the feed

PGX: Create disposable Postgres databases for agents and tests

Added · Updated

PGX creates isolated, short-lived PostgreSQL-compatible databases for coding agents, CI jobs, pull requests and tests.

One runtime serves many databases: connect to a sealed template to mint a database, use it, then let a time-to-live (TTL) clean it up. Its command-line tool installs on macOS or Linux, and PostgreSQL clients and ORMs connect through a database URL. For developers building disposable database workflows, the project reports 1,000 databases using 128–155 MB total on a tested 4-vCPU, 8-GB Linux VM; that is a workload-specific measurement, not a general capacity promise.

What it does

PGX is a PostgreSQL-compatible database runtime for databases that live for minutes or hours. Instead of starting a separate PostgreSQL server for every agent or test, one PGX process hosts isolated databases. You can create an empty database, clone a template, assign a time-to-live (TTL), and let PGX remove the temporary database after its deadline. PostgreSQL clients and ORMs use the connection URL printed by the CLI.

How to use it

Install PGX on macOS or Linux and run `pgx run`. Point an application, ORM or `psql` at the printed connection URL; make an expiring copy with `pgx clone app pr-123 --ttl 30m`.

Common use cases

  • Give a pull request an isolated database: clone an application template as `pr-123`, set a TTL, and run its migrations and tests against the connection URL.
  • Start a test database from a template, load fixtures, run the suite, then let its TTL remove the database.
  • Give a coding agent a temporary named clone, connect its application through the printed URL, and let the TTL expire the database after the task.

Can I use this?

Runs in a terminal

Requirements The CLI installer supports macOS and Linux; Windows is unsupported. Install from the project script or release tarball, then run `pgx run`; no system PostgreSQL is required. A source build needs Rust, RE2 and PostgreSQL 18 client tools.

Caveat PGX is beta and v0.1 is for disposable databases, not production: its profile disables fsync and full_page_writes, so a host crash can lose or corrupt branch data. One runtime is one crash domain. PostgreSQL C extensions cannot load; compatibility with extensions has not been surveyed. The project reports slower point SELECTs and large single-threaded scans than PostgreSQL 18 in its tested workloads.

Worth knowing PGX is beta software for disposable databases, not a production primary or durable system of record: its profile disables fsync and full_page_writes, and one runtime is one crash domain. Existing PostgreSQL C extensions cannot load, Windows is not supported, and the project reports some query types slower than PostgreSQL 18. Under AGPL-3.0, a modified version that supports remote network interaction must prominently offer those users access to its source code at no charge. PostgreSQL-derived portions retain the PostgreSQL License.

Why it's here

  • 698 people have starred it on GitHub.

Numbers as of 8 November 2026, from BuildTube’s latest daily refresh.

Behind it

View setup guide

BuildTube has not run or verified this project. Everything above is written from what the creator published.

Made this?

Quick questions

What is PGX?
PGX is a PostgreSQL-compatible database runtime for databases that live for minutes or hours.
What can I use PGX for?
Give a pull request an isolated database: clone an application template as `pr-123`, set a TTL, and run its migrations and tests against the connection URL; Start a test database from a template, load fixtures, run the suite, then let its TTL remove the database; Give a coding agent a temporary named clone, connect its application through the printed URL, and let the TTL expire the database after the task
Can I run PGX on my computer?
It runs from a terminal on your own computer. The CLI installer supports macOS and Linux; Windows is unsupported. Install the self-contained CLI on macOS or Linux with the project installer or a release tarball, then run `pgx run`; it starts the runtime, prepares the default `app` database and prints a connection URL.
What do I need to use PGX?
macOS or Linux; install PGX with its installer or release tarball. No system PostgreSQL is required. AGPL-3.0.
What license does PGX use?
PGX is AGPL-3.0; PostgreSQL-derived portions retain the PostgreSQL License.

More from this week

Explore by topic

Post this

A ready-made picture of this card for X, LinkedIn or a group chat. Link to this page alongside it.

Share image for PGXDownload share image

For makers

Made this? Show it’s on BuildTube — add the badge to your README or embed the card on your site.

Featured on BuildTube

README badge (Markdown)

[![Featured on BuildTube](https://buildtube.app/badge/gh-pgrundev-pgx.svg)](https://buildtube.app/p/gh-pgrundev-pgx/)

Embed card (HTML)

<iframe src="https://buildtube.app/embed/gh-pgrundev-pgx/" width="560" height="240" style="border:0;max-width:100%" loading="lazy" title="PGX on BuildTube"></iframe>

Back to the feed