AI NewsInfrastructureAnnouncement

Datadog open sources PG Proxy, running 4 trillion Postgres queries monthly

Datadog released PG Proxy, a Go PostgreSQL proxy it runs against 4 trillion queries a month, under an open-source licence.

AI News

Editorial2 min read

LinkedInX
PG Proxy announcement banner on the Datadog blog

Image: Datadog

Why it mattersOne connection pooler, load balancer, and router replaces three tools. A team planning its database layer gets a real pattern that already carries production traffic.

Teams running Postgres at scale usually glue three tools together. PgBouncer for connection pooling. HAProxy for load balancing. Envoy for routing. Each has its own config, its own metrics, and its own failure modes.

Datadog open sourced PG Proxy on 1 December 2026, and the project folds all three jobs into one Go binary. Datadog describes it as "the production-ready PostgreSQL proxy written in Go." The code now lives at github.com/DataDog/pg-proxy. The post is by Mia Malden, Eddie Cai, and Jonathan Hinds.

What one process now does

The proxy does four things. It pools connections and manages traffic. It exposes hooks for sign-in, config, and telemetry. It routes reads and writes. It coordinates database migrations.

Datadog says the three predecessors each had their own config, their own metrics, and their own scaling behaviour. The new tool removes that split.

One technical gap is worth naming. PgBouncer did not support named prepared statements with transaction pooling until version 1.21.0 in October 2023. PG Proxy had that feature before PgBouncer did. That is one reason Datadog wrote its own.

The scale it already carries

Datadog says the tool proxies "4 trillion queries a month" on its own fleet. It handles more than 1,000 Postgres protocol messages per second per CPU core. It authenticates more than 200 million connections a day. It holds more than 600,000 open client connections at a time. These are Datadog's own figures.

The point is not that PG Proxy is faster than any one piece it replaces. The point is that a team no longer stitches three tools together. One binary, one config, one set of metrics.

For a team planning its own Postgres layer, this is a tested starting point. The code is public. Read it, copy the ideas, or run the binary. A company that runs Postgres this hard has now published the shape of its answer.

Why this matters now

AI agents are becoming heavy database users. An agent opens a connection, runs a few queries, closes the connection, and starts again. The same work that one web request used to do is now spread across many short conversations. Connection pools and routing become the limit on how fast the whole system goes.

A tool that holds 600,000 open connections is sized for that kind of load. It also handles 1,000 messages per second per core. A team building an agent-heavy product can read how Datadog solved its own Postgres bottleneck. The other path is finding out the same lesson one outage at a time.

Source

Open sourcing PG Proxy: How we proxy 4 trillion queries a month by Mia Malden, Eddie Cai, and Jonathan Hinds on the Datadog blog.

SourceDatadog

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX
Start a project