Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion CHANGELOG-ENTERPRISE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@
This file contains the list of changes made to the Enterprise edition of PgDog. Since it's being developed in a private repository, this seemed like
the most optimal way to share those changes.

### v2026-10-09

**OS version**: [v0.1.61](CHANGELOG.md#v0161)

| Application | Docker image |
| ------------- | ------------------------------------------------------- |
| PgDog | `ghcr.io/pgdogdev/pgdog-enterprise:v2026-10-09` |
| Control plane | `ghcr.io/pgdogdev/pgdog-enterprise/control:v2026-10-09` |

#### Features

- Show the current value of all globally distributed sequences in the control plane
- Allow to supply the control plane authentication token via environment variable (`helm-ee` chart supports this, too)
- Show replication state during resharding in the control plane

#### Bug fixes

- Pool autoscaling would reload the configuration unnecessarily when pool sizes didn't change
- PgDog better handles shutdown during resharding by sending final updates to the control plane
- Better preserve resharding tasks state across PgDog restarts so the information in control plane information isn't lost
- Autodiscovery would use delayed interval, causing `check_interval` to be larger than configured

### v2026-09-17

**OS version**: [v0.1.59](CHANGELOG.md#v0159)
Expand All @@ -20,7 +42,6 @@ the most optimal way to share those changes.
- Show `COPY_DATA` (resharding) tasks in the control plane UI
- Add checkout timeout metric graph and Incident.io alert trigger


#### Bug fixes

- Autodiscovery with `replicas_only = true` would deadlock the pool due to a regression in load balancer target selection. Introduced in `v0.1.53` and fixed in `v0.1.59`.
Expand Down
154 changes: 128 additions & 26 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,149 @@ PgDog is released weekly, on Thursdays. Each release includes tagged Docker imag

For the [Enterprise edition](https://docs.pgdog.dev/enterprise_edition/), see [CHANGELOG-ENTERPRISE.md](CHANGELOG-ENTERPRISE.md).

### v0.1.61

| Application | Docker image |
| ----------- | -------------------------------- |
| PgDog | `ghcr.io/pgdogdev/pgdog:v0.1.61` |

#### Performance

- Improve resharding COPY read performance by over 10x on network-bound storage databases (e.g., RDS) with large toasted tables @jkaczman
- Cache query ASTs regardless of comments, improving query parse time for queries that use comments for routing @sgrif
- Use jemalloc in our query parser, decreasing memory usage for deployments using long queries @levkk
- Improve schema loading times at PgDog startup by a factor of 10 @levkk @ariel-lahiany
- Improve resharding replication performance by 80% by switching to async shard writes @jkaczman

#### Bug fixes

- `LISTEN` and `NOTIFY` didn't escape identifiers, breaking pub/sub for channel names and payloads containing non-escaped data @mhenrixon
- Passthrough auth would block pool until configuration was reloaded if user connected with a bad password. We now check the password before adding the user into the in-memory config. @levkk
- Backend connection recovery would commit implicit transactions for pipelined requests @murex971
- Cross-shard `ORDER BY` would use wrong column if it was aliased in the target list @jkaczman
- Account for WAL timeline to detect new primary after failover; tools like Patroni don't terminate failed primaries, so PgDog was confused when it was able to connect to one @levkk @roshangara
- `LISTEN`/`NOTIFY` broker connection would not restart if terminated by Postgres @levkk @alphec
- Fix crash if multi-statement query contained `RESET ALL` @levkk @roshangara
- Regression in `LIMIT` not working without `ORDER BY` in cross-shard queries @levkk @nsavvide
- Correctly handle `SET LOCAL` outside of transactions @murex971
- `CREATE TEMP SEQUENCE` now correctly pins connections @murex971
- Fix off-by-one error in sharding replication table LSNs @jkaczman
- Don't rewrite client requests before mirroring, allowing mirrors to use a different sharding configuration @sgrif
- Fix configuration reloads blocking traffic to existing databases temporarily while they run a health check if `require_healthcheck_on_discovery` was enabled @frodsan
- Generate direct-to-shard and cross-shard variants for queries containing aggregates/ordering/limit/offset/etc. to make sure we don't rewrite the query if it uses direct-to-shard routing. @murex971
- `pg_advisory_unlock(NULL)` incorrectly released all advisory locks @dipeshbabu
- Correctly handle parameter casting for `UUID` parameters in query routing for sharded deployments @sgrif
- Correctly handle `RESET ALL` @dipeshbabu

#### Features

- Allow to configure `auth_type` on users in `users.toml`
- **[Breaking]** Plugins now have to process one statement at a time @sgrif
- **[Experimental]** Support for RDS IAM passthrough authentication. PgDog attempts to connect to RDS with the token provided by the user, and if successful, caches that token for 15 minutes. This works reasonably well if clients use IAM tokens correctly (i.e., they cache them for 15 minutes, too) @levkk
- **[Breaking]** For globally distributed sequences (EE-only), include the schema name into the sequence @murex971
- Validate foreign key constraints after resharding is complete @meskill
- Transactions now lazily connect to shards as needed. This allows direct-to-shard explicit transactions _not_ to connect to all shards at all times, improving connection pool efficiency. @levkk
- Cross-shard `UPDATE` and `SELECT` queries that use non-deterministic functions (e.g., `now()`, `current_timestamp()`) now read/write consistent values across all shards (generated by PgDog instead of the database) @jkaczman
- Show accurate memory usage for AST cache using Postgres arena allocator statistic @sgrif
- Wait for resharding tasks to shutdown gracefully on PgDog shutdown @meskill
- Send replication state to control plane (EE) @meskill

#### Code quality

- Sharded our CI, which is now 5 times faster @jkaczman
- Benchmark each commit using Bencher to prevent performance regressions @jkaczman

#### Note for contributors

We stopped accepting pull requests on the repository due to large influx of AI-generated submissions. PgDog still accepts bug reports, feature requests, and fixes, as long as those are submitted via GitHub issues instead. If you want to provide code, please send us a branch from your own fork. We will probably rewrite it to match our code quality standards, but we'll credit you for the contribution.

🙏 ❤️

**Full Changelog**: https://github.com/pgdogdev/pgdog/compare/v0.1.60...v0.1.61

### v0.1.60

| Application | Docker image |
| ----------- | -------------------------------- |
| PgDog | `ghcr.io/pgdogdev/pgdog:v0.1.60` |

#### Performance

- 40% faster handling of `SELECT` in sharded queries by removing redundant AST walks @jkaczman

#### Bugs

- 0.0 and -0.0 hashed to the same value, which broke `DISTINCT`, `count()` and other cross-shard functions @MaxFreedomPollard
- `session_replication_role` should be set via `SET` command @levkk
- `interval` type wasn't correctly parsed for some edge cases in cross-shard aggregates @dipeshbabu
- `stddev` / `variance` failed on some `NULL` values in cross-shard aggregates @dipeshbabu
- `count()` wouldn't preserve original input type / would cast everything to `bigint` @dipeshbabu
- `NULL` was incorrectly handled in array elements in cross-shard queries @dipeshbabu
- `timestamp`(tz) infinite values were not correctly parsed in cross-shard queries @dipeshbabu
- `timestamp`(tz) fractional time wasn't correctly preserved in cross-shard queries @dipeshbabu
- `jemalloc` would crash on ARM targets with page size >= 16k @dipeshbabu
- client/server TLS wouldn't load the whole chain, so client keys signed by intermediates were rejected @dipeshbabu
- don't run 2pc on direct-to-shard write transactions @rlittlefield
- connection pool statistics are preserved on `RELOAD` @murex971
- handle `numeric` infinite values correctly in cross-shard queries @dipeshbabu
- fully-qualified columns were skipped in `DISTINCT ON` @jkaczman
- sequence names are quoted to make sure they work with all table names @dipeshbabu
- don't drop `SET check_function_bodies` in schema sync @meskill
- pg deparser wasn't handling timezone operations correctly @meskill
- correctly route advisory lock calls in sharded deployments & handle the two parameter variant @jkaczman
- correctly track `pg_catalog.pg_advisory_*` fully qualified advisory lock calls @dipeshbabu

#### Code quality

- migrate replication/resharding to new tasks API @meskill
- `unique_id` and `insert_splits` cleanup @sgrif
- auto retries to some flaky spots in CI @jkaczman

**Full Changelog**: https://github.com/pgdogdev/pgdog/compare/v0.1.59...v0.1.60

### v0.1.59

| Application | Docker image |
| ----------- | -------------------------------- |
| PgDog | `ghcr.io/pgdogdev/pgdog:v0.1.59` |

#### Bug fixes
- **[Breaking]** Manual bans are now carried over to new connection pools after `RELOAD`. They were previously discarded, allowing traffic to flow through prematurely after configuration reload. Breaking because this changes existing behavior and may require operators to adjust migration scripts to issue a separate `UNBAN` command after `RELOAD`. @levkk
- Schema reload was not triggered on certain DDL statements, e.g., `CREATE TYPE`, which caused incorrect `RowDescription` messages to be sent to clients for direct-to-shard and cross-shard queries which touched those new types. @levkk
- 2pc WAL checkpointer could cause WAL corruption by removing segments necessary for recovery. Fixed by storing relationships between segments containing data about the same transaction, preventing dependent segments from being removed prematurely. @levkk
- SCRAM authentication could cause DoS because it was moved to background Tokio threads, which were unbounded. Added `background_workers` setting (default 0, disabling this whole feature) to limit that concurrency. Moved SCRAM auth back to the Tokio async worker pool. @levkk
- Fix segfault in query normalization (only affected the Enterprise edition) caused by a bug in our parser. Added `pg_raw_parse::normalize` to our regression test suite to prevent recurrences. @levkk
- Setting `connection_recovery` to `drop` would cause connection churn for connection drivers using prepared statements. Fixed by ensuring we don't drop connections in this scenario. @levkk
- Disable triggers on destination shards during resharding (by setting `session_replication_role` to `replica`). This prevents triggers from running twice and also ensures we can copy tables that use foreign keys and which delete / update relationships during resharding. @meskill
- Prevent deadlock in extended protocol pipelines when a client sends a `Describe` out of a specific order @murex971
- Correctly handle omnisharded to sharded joins where the sharding key is present in omnisharded tables @ygxio @levkk
- Connections using `LISTEN` would incorrectly handle that command sent via extended protocol (returning `ReadyForQuery` prematurely) @murex971
- When using passthrough auth, reloading the config would not carry over any user-specific settings configured in `users.toml` @mehcode
- Role detection (`role = "auto"`) could cause deadlock in the pool for read-only clusters that served write transactions (e.g., `BEGIN`, _not_ `BEGIN READ ONLY`) @levkk
- Query router wouldn't handle nested typecasts correctly for shard key detection @sgrif

- **[Breaking]** Manual bans are now carried over to new connection pools after `RELOAD`. They were previously discarded, allowing traffic to flow through prematurely after configuration reload. Breaking because this changes existing behavior and may require operators to adjust migration scripts to issue a separate `UNBAN` command after `RELOAD`. @levkk
- Schema reload was not triggered on certain DDL statements, e.g., `CREATE TYPE`, which caused incorrect `RowDescription` messages to be sent to clients for direct-to-shard and cross-shard queries which touched those new types. @levkk
- 2pc WAL checkpointer could cause WAL corruption by removing segments necessary for recovery. Fixed by storing relationships between segments containing data about the same transaction, preventing dependent segments from being removed prematurely. @levkk
- SCRAM authentication could cause DoS because it was moved to background Tokio threads, which were unbounded. Added `background_workers` setting (default 0, disabling this whole feature) to limit that concurrency. Moved SCRAM auth back to the Tokio async worker pool. @levkk
- Fix segfault in query normalization (only affected the Enterprise edition) caused by a bug in our parser. Added `pg_raw_parse::normalize` to our regression test suite to prevent recurrences. @levkk
- Setting `connection_recovery` to `drop` would cause connection churn for connection drivers using prepared statements. Fixed by ensuring we don't drop connections in this scenario. @levkk
- Disable triggers on destination shards during resharding (by setting `session_replication_role` to `replica`). This prevents triggers from running twice and also ensures we can copy tables that use foreign keys and which delete / update relationships during resharding. @meskill
- Prevent deadlock in extended protocol pipelines when a client sends a `Describe` out of a specific order @murex971
- Correctly handle omnisharded to sharded joins where the sharding key is present in omnisharded tables @ygxio @levkk
- Connections using `LISTEN` would incorrectly handle that command sent via extended protocol (returning `ReadyForQuery` prematurely) @murex971
- When using passthrough auth, reloading the config would not carry over any user-specific settings configured in `users.toml` @mehcode
- Role detection (`role = "auto"`) could cause deadlock in the pool for read-only clusters that served write transactions (e.g., `BEGIN`, _not_ `BEGIN READ ONLY`) @levkk
- Query router wouldn't handle nested typecasts correctly for shard key detection @sgrif

#### Performance
- Improve performance of resharding copy data phase when using multiple replicas by more fairly distributing workloads between source databases @meskill

- Improve performance of resharding copy data phase when using multiple replicas by more fairly distributing workloads between source databases @meskill

#### Features
- Support `LIMIT` and `OFFSET` in cross-shard statements sent via `PREPARE` and `EXECUTE` @jkaczman
- Support cross-account RDS IAM authentication by using STS `assume-role` @lyupan-cb
- Add `total_wait_time` and `avg_wait_time` to OpenMetrics (and OTEL) @rimrakhimov
- Support Postgres foreign keys during resharding by disabling Postgres triggers during replication. This also ensures that triggers on the destination shards don't run, potentially causing double data insertion. @meskill
- Inject correct time (e.g. `timestamp`, `timestamptz`, etc.) and UUID values in cross-shard and omnisharded `INSERT` queries, to make sure the values are identical on all shards. This replaces database-generated defaults without changing the schema. Enable by turning on `rewrite.non_deterministic_functions = "rewrite"`. @jkaczman
- Add `checkout_timeout` metric to OpenMetrics (and OTEL) and admin database (`SHOW STATS`) which shows how many times clients hit the error for a particular pool @levkk

- Support `LIMIT` and `OFFSET` in cross-shard statements sent via `PREPARE` and `EXECUTE` @jkaczman
- Support cross-account RDS IAM authentication by using STS `assume-role` @lyupan-cb
- Add `total_wait_time` and `avg_wait_time` to OpenMetrics (and OTEL) @rimrakhimov
- Support Postgres foreign keys during resharding by disabling Postgres triggers during replication. This also ensures that triggers on the destination shards don't run, potentially causing double data insertion. @meskill
- Inject correct time (e.g. `timestamp`, `timestamptz`, etc.) and UUID values in cross-shard and omnisharded `INSERT` queries, to make sure the values are identical on all shards. This replaces database-generated defaults without changing the schema. Enable by turning on `rewrite.non_deterministic_functions = "rewrite"`. @jkaczman
- Add `checkout_timeout` metric to OpenMetrics (and OTEL) and admin database (`SHOW STATS`) which shows how many times clients hit the error for a particular pool @levkk

#### Code quality
- Fix typo in config example @joshuaharry
- Refactor resharding copy data code to use the tasks API @meskill
- Cleanup of omnisharded table handling during copy data phase @meskill
- Remove redundant check in shard key update flow @sgrif
- CI now uses Postgres 18 (used to be 16) @jkaczman
- Make some tests more deterministic instead of relying on timing @dipeshbabu @ziomarco

- Fix typo in config example @joshuaharry
- Refactor resharding copy data code to use the tasks API @meskill
- Cleanup of omnisharded table handling during copy data phase @meskill
- Remove redundant check in shard key update flow @sgrif
- CI now uses Postgres 18 (used to be 16) @jkaczman
- Make some tests more deterministic instead of relying on timing @dipeshbabu @ziomarco

### v0.1.58

Expand Down
Loading