PgDog icon

PgDog

PgDog is an open-source PostgreSQL proxy that combines connection pooling, load balancing, and sharding for horizontal scaling. It is designed to work as a drop-in layer in front of existing applications with no app changes required.

PgDog

Overview

PgDog is an open-source PostgreSQL proxy for horizontal scaling. It combines connection pooling, load balancing, and sharding in one executable that can be deployed with Helm or Docker and placed in front of existing PostgreSQL applications.

The product is built to keep PostgreSQL behavior intact while scaling out. The homepage emphasizes transaction pooling, read/write routing, shard-aware query execution, cross-shard transactions, replicated tables, and support for common Postgres client libraries and migration workflows.

Core capabilities

Connection pooling in real transaction mode

PgDog can sit in front of PostgreSQL as a transaction-aware pooler. The homepage says it can share a small number of Postgres connections between 100,000+ clients while preserving session state, advisory locks, LISTEN/NOTIFY, and prepared statements.

Read/write load balancing

It can route reads and writes through one endpoint by using replica health, replication lag, and failover detection. The load-balancing section says SELECT queries go to replicas while other queries go to the primary, using PostgreSQL’s internal SQL parser for compatibility.

Query-based sharding and scatter/gather execution

PgDog can extract a sharding key from queries and send them to the correct shard. Queries without a key can be run across all databases in parallel, which the homepage describes as a scatter/gather approach.

Cross-shard transactions and schema coordination

The product supports cross-shard writes with automatic rollback on error, using PostgreSQL prepared transactions and two-phase commit. The homepage also says DDL is propagated across shards so common migration tools can continue to work.

Relational sharding features

PgDog supports replicated tables and shard-local joins, and it can keep integer primary keys monotonic and generated in the proxy. It also supports sharding-key updates through ordinary UPDATE statements.

Common use cases

  • Reduce connection pressure on PostgreSQL

    Use PgDog when an application needs more PostgreSQL clients than a single database can comfortably handle. Its transaction pooling mode is positioned for high connection counts while preserving common session features.

  • Route traffic across primaries and replicas

    Use it to send reads to replicas and keep writes on the primary through one stable endpoint. The product is aimed at teams that want lag checks and failover handling without changing application configuration.

  • Shard multi-tenant or key-based datasets

    Use PgDog when tenant-aware or key-based data needs to be split across shards without rewriting the application. The proxy can read the sharding key from SQL and direct each query to the right database.

  • Maintain relational behavior while scaling horizontally

    Use it for workloads that need cross-shard writes, replicated tables, or shard-local joins while keeping PostgreSQL semantics. The homepage highlights ACID behavior, two-phase commit, and ordinary SQL patterns such as UPDATE-based key moves.

  • Operate PgDog at fleet scale

    Use the enterprise offering when a team needs centralized fleet management, live query metrics, or hands-on engineering support. The roadmap and blog describe these capabilities for larger deployments and production operations.

Pros and Cons

Pros

  • Combines pooling, load balancing, and sharding in one PostgreSQL proxy instead of separate tools.
  • Designed to work as a drop-in proxy, with no application changes required according to the homepage and blog.
  • Supports PostgreSQL session features such as SET commands, advisory locks, LISTEN/NOTIFY, and prepared statements in transaction pooling mode.
  • Can route reads to replicas, detect lag or failover, and move traffic without configuration changes.
  • Includes relational sharding features such as cross-shard transactions, replicated tables, and DDL propagation across shards.

Cons

  • The collected sources do not provide a full documentation set for supported integrations, drivers, or infrastructure beyond general mentions of client libraries and deployment methods.
  • Enterprise capabilities such as a control plane and query insights are described as in development, so they are not yet generally available in the source material.
  • Pricing details are not visible in the collected pricing-page text, so the public cost structure remains unclear from these sources.

FAQ

Does PgDog require application changes?

PgDog is designed to be deployed as a PostgreSQL proxy in front of existing applications. The homepage and blog describe it as a drop-in proxy with no app changes required, and the funding announcement says it can be deployed in a cloud account, on-premises, in a colo rack, or on a laptop.

What does PgDog do?

The source shows PgDog serving three roles: connection pooler, load balancer, and distributed database/sharding proxy. The homepage and pricing page frame it as a single executable that handles connection pooling, read/write routing, and sharding logic.

Is PgDog free or paid?

The pricing page does not show plan names or prices in the collected text. It does show an install path for the open-source project, and the enterprise page describes separate enterprise features such as a control plane, query insights, and dedicated support.

What is included in PgDog Enterprise?

The enterprise roadmap says the team is building centralized configuration, fleet management, role-based access, query statistics, automatic query plan analysis, and bad-query blocking. It also says dedicated support is available now.

How is PgDog deployed?

The homepage shows installation examples for Helm and Docker, and the funding announcement says PgDog can be deployed anywhere, including on-premises and in a cloud account. The collected sources do not provide a full matrix of supported databases, drivers, or cloud integrations.

Quick Facts

Category
Developer Tool
Product type
Open-source PostgreSQL proxy
Core functions
Connection pooler, load balancer, sharding proxy
Deployment
Helm, Docker, cloud, on-premises, and local environments
Website
pgdog.dev
Enterprise status
Control plane and query insights are in development; dedicated support is available now

Alternativas ao PgDog

MakerLoft icon

MakerLoft

MakerLoft is a chat-first AI app builder for non-developers who want to create static sites or full-stack apps from a GitHub repository. It supports a free GitHub Pages path and a DigitalOcean-backed app path with sign-ins, payments, and an admin dashboard.

ByteAsk icon

ByteAsk

ByteAsk is a terminal-first AI coding agent for C and C++ that edits repositories and verifies changes with the real compiler, debugger, sanitizers, and tests before showing a diff. It offers a free tier plus paid plans, with editor connectors and zero-retention handling described in the source.

hob icon

hob

hob is an independent workspace for coding agents that keeps agent sessions, terminals, history, and follow-up work organized around the tools and providers you already use. It is aimed at developers who want local control over routing, history, and workspace structure rather than a bundled model stack.

Ably Chat icon

Ably Chat

Ably Chat is a chat API platform for building custom realtime chat applications. It supports room-based messaging, typing indicators, presence, reactions, and message updates, with usage-based pricing options for different deployment stages.

ClawTick icon

ClawTick

ClawTick is an AI agent automation platform for scheduling jobs from the CLI, dashboard, or REST API. It is aimed at developers and teams running LangChain, CrewAI, webhook, or custom agent workflows that need monitoring, alerts, and logs.

Falconer icon

Falconer

Falconer is an AI-powered company brain that keeps internal documentation accurate, searchable, and up to date by syncing with tools like GitHub, Slack, and Linear. It helps engineering and cross-functional teams centralize knowledge and answer questions from a shared source of truth.