Skip to content

Releases: pgdogdev/pgdog

v0.1.30

19 Feb 18:18
c316280

Choose a tag to compare

What's Changed

BREAKING: user settings take priority

User settings in users.toml now take priority over database settings in pgdog.toml. This was the opposite previously. For example:

users.toml

[[users]]
name = "pgdog"
database = "prod"
pool_size = 20

pgdog.toml

[general]
default_pool_size = 10

[[databases]]
name = "prod"
host = "127.0.0.1"
pool_size = 25

The connection pool for user pgdog will be 20.

🙏 @mijoharas

Changelog

  • feat: support OFFSET in cross-shard SELECT queries
  • feat: support for plugin API versioning @meskill
  • fix: incorrect error handling when queries are pipelined (psycopg, Sequelize, etc.)
  • feat: client_connection_recovery defaults to drop
  • refactor: make schema serializable for Enterprise Edition integration
  • feat: schema fetches foreign keys to support tables without sharding keys

New Contributors

Full Changelog: v0.1.29...v0.1.30

v0.1.29

12 Feb 15:37

Choose a tag to compare

What's Changed

  • feat: expose default_pool_size / pool_size, prepared_statements_limit and query_cache_limit as Prometheus metrics @Adi-Goll
  • feat: support cross-shard LIMIT (but not OFFSET, yet)
  • feat: support multiple SET statements in one query
  • feat: add client_connection_recovery setting which allows to close client connections that have received a checkout timeout / all replicas down error from PgDog
  • fix: race condition in Sequelize (Bind, Exexute, Flush, Sync) that caused record creation to be acknowledged before transaction committed in Postgres
  • fix: don't attempt to recover server connections that have received partial client requests (hard to determine state of connection)
  • fix: handle PortalSuspended message correctly
  • chore: Prisma, Sequelize tests
  • fix: place Sync into its own ClientRequest in spliced requests (Java driver)

New Contributors

Full Changelog: v0.1.28...v0.1.29

v0.1.28

05 Feb 16:30
943b652

Choose a tag to compare

What's Changed

  • fix: correctly handle INTEGER to BIGINT conversion during schema-sync by mutating table definitions instead of appending ALTER TABLE statements, and handle partitioned tables correctly
  • fix: average calculation in SHOW STATS for reads and writes stats
  • feat: make resharding COPY format configurable (text or binary)
  • feat: add TIMESTAMP/TIMESTAMPTZ support for aggregates (max(), min())
  • fix: parsing (de)serialization for composite types that cross a CopyData boundary during data-sync
  • fix: confusing TLS connection icon in logs (was open, now it's locked) @bzp2010
  • feat: automatically reload config (incl. schema) after DDL in a sharded cluster (single pgdog node, local dev/staging only)
  • fix: omnishard write fan-out is opaque now, returns rows changed from one shard only, while mutating rows everywhere; necessary for compatibility with Postgres behavior
  • feat: [[omnisharded_tables]] takes priority over [[sharded_tables]] in pgdog.toml
  • feat: add kind = "default" for for list-based sharding to mimic Postgres partitions behavior
  • fix: apply query_timeout to entire client/server exchange instead of just server responses (prevents TCP black holes)

New Contributors

Full Changelog: v0.1.27...v0.1.28

v0.1.27

30 Jan 16:47

Choose a tag to compare

What's Changed

  • feat: allow [[users]] to specify multiple databases (or all databases for admin users)
  • feat: handle INSERT ... SELECT for one row in sharded databases
  • feat: support INSERT without column names, using schema inference
  • feat: automatically inject pgdog.unique_id() if a BIGINT PRIMARY KEY isn't specified in INSERT statement. ORMs like ActiveRecord do this, making them work out of the box.
  • feat: add read/write query per-pool statistics (Prometheus and SHOW STATS)
  • chore: add Enterprise Edition hooks for the query parser
  • feat: rewrite INTEGER to BIGINT during schema-sync if its a primary key (supports foreign key references too)
  • feat: make how we treat system catalogs like pg_database configurable

Full Changelog: v0.1.26...v0.1.27

v0.1.26

23 Jan 22:51
c8f474e

Choose a tag to compare

What's Changed

  • feat: add query_cache_parse_time (Prometheus only) metric for measuring how much time PgDog spends parsing queries
  • chore: logging improvements for connections terminated by Postgres @zacharyftw
  • fix: detect and handle pg_dump's end of input COPY marker
  • fix: handle NULL sharding key in COPY parser
  • fix: shard key update didn't disconnect servers in case of error, causing routing confusion
  • feat: omnishard system catalogs (e.g. pg_database) by default so psql works out of the box
  • feat: all tables are omnisharded now unless specified in [[sharded_tables]] (or [[sharded_schemas]]). [[omnisharded_tables]] is now optional and can be used to configure sticky routing for specific tables if needed. PgDog connects to Postgres on startup (only for sharded clusters) and fetches the schema, so it can detect sharded columns with column names in [[sharded_tables]] only. Run RELOAD after schema migrations to re-load schema.
  • feat: added omnisharded_sticky setting to default to sticky routing for omnisharded SELECT queries
  • feat: track server last sent/received messages
  • fix: improve lock contention around server stats - faster QPS / server connection check-in

New Contributors

Full Changelog: v0.1.25...v0.1.26

v0.1.25

15 Jan 22:36
32b3942

Choose a tag to compare

What's Changed

  • fix: ensure config is TOML-serializable
  • fix: prepared statements eviction CPU churn

Full Changelog: v0.1.24...v0.1.25

v0.1.24

09 Jan 03:52
4a195df

Choose a tag to compare

What's Changed

  • fix: incorrect NotificationResponse parsing caused pool connections to not be created, taking the connection pool down.

Full Changelog: v0.1.23...v0.1.24

v0.1.23

08 Jan 16:04
5843a30

Choose a tag to compare

What's Changed

  • fix: SET pgdog.sharding_key was ignoring schema sharding
  • fix: least active connections load balancing algorithm was doing the opposite

Full Changelog: v0.1.22...v0.1.23

v0.1.22

02 Jan 04:48
692883f

Choose a tag to compare

What's Changed

  • feat: client_idle_in_transaction_timeout
  • fix: escape parameter values in SET queries used for server/client parameter synchronization
  • feat (experimental): direct C/Rust bindings for pg_query, removing protobuf, resulting in 25% performance improvement for simple protocol queries

Full Changelog: v0.1.21...v0.1.22

v0.1.21

25 Dec 17:39
2a8e4d1

Choose a tag to compare

What's Changed

  • fix: SET TRANSACTION was captured as a session parameter
  • fix: handle SET parameters after a regular query inside transaction, correctly persisting client session state between transactions
  • chore: add required tools via mise by @mijoharas
  • refactor: move sharding key updates handling into the new rewrite engine
  • feat: sharding key updates now support expressions (e.g., SET created_at = now()) and RETURNING clause
  • feat: make query parser optional for load balancing, rely on pgdog.role connection parameter for read/write splitting

Happy holidays!

Full Changelog: v0.1.20...v0.1.21