github pgdogdev/pgdog v0.1.61

4 hours ago

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 2x 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: v0.1.60...v0.1.61

Don't miss a new pgdog release

NewReleases is sending notifications on new releases.