Skip to content

Roadmap

PgDog is being actively developed. Along with performance improvements and bug fixes, new features are constantly being added. The goal for PgDog is to manage most aspects of at-scale Postgres production operations, and we're just getting started.

Chart

Stable and in production.

Partially built, but what's already there is working.

On the roadmap, but not started yet.

Not currently planned.

〃 Shorthand for "ditto" or "same as above".

Foundational features

These features are required for PgDog to act as a replacement for PgBouncer and/or PgCat.

Feature Status Notes
Transactional pooler
Session mode No sharding or load balancing.
Load balancer
Health checks & failover
Prepared statements
Metrics Admin database views contain more columns than PgBouncer.
Encryption
Authentication Password authentication only. scram-sha-256, md5 are supported.

Sharding

These features are required for PgDog to shard Postgres databases without application changes.

Query engine

Query engine provides a uniform view over multiple shards. Clients can use regular SQL statements to read and write data, as if they were using a normal (unsharded) database.

Feature Status Notes
Direct-to-shard reads Sharding key must be specified in the query.
Direct-to-shard writes Sharding key must be specified in the query. Multi-tuple INSERTs not supported yet.
Cross-shard queries Partial aggregates and sorting support. CTEs & subqueries not supported yet.
Cross-shard CTEs #380
Cross-shard subqueries #381
Cross-shard joins #94
Cross-shard transactions Supports two-phase commit. Not benchmarked yet.
Omnisharded tables Unsharded tables with identical data on all shards.
Rewrite queries Alter queries to support aggregate/sorting by rows not returned in result set.
COPY Sharding key must be specified in the statement and the data. Supports text, CSV, and binary formats only.
Multi-statement queries e.g.: SELECT 1; SELECT 2;. First query is used for routing only, entire request sent to the same shard(s). #395.

Aggregates

Support for aggregate functions in cross-shard queries.

Aggregate function Status Notes
SUM Target column(s) must be present in returned rows.
COUNT
MIN
MAX
AVG #434
Percentile distributions Could be expensive to calculate, need spill to disk.

Sorting

Support for sorting rows in cross-shard queries.

Sorting function Status Notes
ASC column Target column(s) must be present in returned rows.
DESC column
ASC a, b, c Sorting by multiple columns works. Columns must be present in returned rows.
DESC a, b, c
<-> pgvector sort by L2. Both columns must be in result set.

Resharding

Resharding splits existing database(s) into more shards, without requiring downtime.

Feature Status Notes
Data sync Sync table data with logical replication. Not benchmarked yet.
Schema sync Sync table, index and constraint definitions. Not benchmarked yet.
Online rebalancing Not automated yet, requires manual orchestration.

Schema & data integrity

Manage table schema(s) and ensure data constraints are enforced across multiple shards.

Feature Status Notes
Primary keys BIGINT and UUID partially supported for hash-based sharding only. #386. Other data types require cross-shard unique index support.
Unique indexes Enforce uniqueness constraints across an unsharded column(s). #439.
CHECK constraints They are generally arbitrary SQL checks and need to be executed prior to row updates.
Schema validator Check that all shards have identical tables, indexes, etc.

Orchestration

Features around production deployments.

Feature Status Notes
DNS cache Override DNS TTL to accelerate failover. Built but not documented.
Primary failover to standby Move writes from a failed primary database to a standby replica, promoting it. Not currently planned.
Configuration sync Synchronize config changes between instances of PgDog. Admin command to pause traffic exists, but no automation.