Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
57d9a7c
Rewrite bug fixes - old cache key, more efficient update (#516)
jaggederest Sep 30, 2025
e153e2c
Banning & connection pool fixes (#512)
levkk Oct 1, 2025
cab4685
Override admin in users.toml (#526)
levkk Oct 1, 2025
54e86cf
Use parsed AST instead of double-parsing SELECT stmt (#527)
levkk Oct 1, 2025
cecfceb
Add query parameter support for Database URL configuration (#525)
grk Oct 2, 2025
b4f9704
Release 0.1.9 (#529)
levkk Oct 2, 2025
9c49667
Update README.md
levkk Oct 2, 2025
72f1523
Support SCRAM via TLS for client connections (#530)
levkk Oct 2, 2025
029623d
Schema sync fixes and tests (#533)
levkk Oct 3, 2025
4146e31
Add auth tests & plain auth for clients (#534)
levkk Oct 3, 2025
2c145b9
swap to u16 on inbound and outbound paths (#522)
jaggederest Oct 3, 2025
3b26e1e
TLS hot swap (#523)
jaggederest Oct 3, 2025
eafe7b7
Fix duplicate host check warning (#535)
levkk Oct 5, 2025
49a68ef
Correctly handle extended error state (#536)
levkk Oct 5, 2025
2382b3b
Correct log message (#537)
levkk Oct 5, 2025
e84e9be
Aggregate stddev/variance (#503)
jaggederest Oct 6, 2025
cadbc77
Incremental Test improvements (#511)
jaggederest Oct 6, 2025
e917564
Avoid cloning AST until later in the rewrite process, where we need t…
jaggederest Oct 6, 2025
a67f417
Add hooks (#544)
levkk Oct 6, 2025
d727e21
Add plugin unit/integration tests, optional for PR merge (#371)
jaggederest Oct 7, 2025
1f608d6
Support savepoints (#547)
levkk Oct 7, 2025
46e7142
Fix: cancel backend sessions when shutdown timeout expires (#524)
KR-bluejay Oct 8, 2025
e63ed13
Fix rollbacks with query parser disabled (#549)
levkk Oct 8, 2025
6884194
Annotate explain plans with routing decisions (#546)
jaggederest Oct 9, 2025
101d0ce
Tag v0.1.10 (#551)
levkk Oct 9, 2025
eabb1cb
Dont rewrite anon prepared statements by default (#556)
levkk Oct 10, 2025
fb9faa3
Include SSL cert in docker image (#557)
levkk Oct 12, 2025
682180d
Add after_connected hook (#558)
levkk Oct 12, 2025
4ef542c
Use Bytes for Bind fields (#559)
levkk Oct 13, 2025
4cae654
Another attempt at prep stmt fix (#561)
levkk Oct 15, 2025
5c6571d
Prepared statement cache eviction (#562)
levkk Oct 16, 2025
5167249
Sharding key updates (#555)
jaggederest Oct 16, 2025
4098571
Close servers that havent finished reading/writing (#566)
levkk Oct 19, 2025
38bf275
Add more server tests (#568)
levkk Oct 20, 2025
2b1d3b9
Identify client in query engine (#570)
levkk Oct 21, 2025
b55c951
Dont alter publication during schema sync (#572)
levkk Oct 22, 2025
9358fe3
Primary key check (#573)
levkk Oct 22, 2025
6734d15
Tag 0.1.12 (#579)
levkk Oct 24, 2025
983a8ec
Build only pgdog in Dockerfile (#580)
levkk Oct 27, 2025
b5d9596
Server error stats (#581)
levkk Oct 28, 2025
b35bf88
Track more errors in query engine (#582)
levkk Oct 28, 2025
7e2b1e9
Add include_primary_if_replica_banned rw_split strategy (#583)
levkk Oct 29, 2025
4d8a965
Tag v0.1.13 (#588)
levkk Oct 29, 2025
b560115
Add cancellation safety to message reading (#591)
levkk Oct 30, 2025
869d56c
Split sharded inserts to allow multirow insert into correct tables (#…
jaggederest Oct 30, 2025
4855256
feat(docker): upgrade psql to 18 (#593)
mscrivo Oct 31, 2025
319acb5
add tls_client_required setting (#587)
zxaos Oct 31, 2025
59627b9
Reclaim space from buffer after every request (#592)
levkk Nov 1, 2025
378c96e
Profiling utils (#595)
levkk Nov 3, 2025
658b34a
Schema-based sharding (#596)
levkk Nov 6, 2025
1905548
Config reload was delayed by one transaction (#598)
levkk Nov 7, 2025
7bc7a81
Add connect_time and connect_count stats (#599)
levkk Nov 7, 2025
cf3461c
Update `Dockerfile` to accept the pg version as a build argument (#601)
scottjacobsen Nov 11, 2025
874c044
Copy partitioned table data (#602)
levkk Nov 12, 2025
6599967
Create parse_queries_enabled configuration option. (#605)
mijoharas Nov 12, 2025
1e9b8be
Add update/delete support to logical replication (#603)
levkk Nov 13, 2025
46b4869
Tag 0.1.15 (#607)
levkk Nov 13, 2025
5f561be
Add --cutover flag to schema-sync (#608)
levkk Nov 13, 2025
d06e265
Add setting for controlling connection cleanup (#611)
levkk Nov 17, 2025
c46f1dd
Add statement mode (#612)
levkk Nov 17, 2025
a092d1d
Replica lag monitor (#613)
levkk Nov 18, 2025
a272ce2
Pool checkout tweak (#615)
levkk Nov 19, 2025
74e51d9
Automatic database role detection (#616)
levkk Nov 20, 2025
bd7f3e2
Omnisharded tables routing fix (#618)
levkk Nov 21, 2025
919e5ee
State::IdleInTransaction isn't updated until the end of a request (#617)
jaggederest Nov 21, 2025
6762a4e
Omni routing and change to convergence for schema sharding (#620)
levkk Nov 21, 2025
eb777eb
Add some test coverage (#622)
levkk Nov 21, 2025
f25f092
Handle NULL sharding key in query router (#624)
levkk Nov 24, 2025
0421fe6
search_path schema-based sharding (#621)
levkk Nov 24, 2025
5b28b90
Client active status update (#626)
levkk Nov 24, 2025
7d58743
[Schema] Handle IDENTITY columns (#627)
levkk Nov 25, 2025
42da082
fix: prepared statements with simple protocol not working (#628)
levkk Nov 25, 2025
3745f36
Fix: Preserve decimal/float values in INSERT and UPDATE statements (#…
phillipvanheerden Nov 25, 2025
7500cde
fix: dropping identity column creation (#631)
levkk Nov 25, 2025
e4f6b89
feat: sv_idle_xact, fix: multi-tuple insert fix (#632)
levkk Nov 25, 2025
17cd664
fix: double checking for sharding key
levkk Nov 25, 2025
f42b723
feat: track sv_idle_xact in OpenMetrics (#633)
levkk Nov 25, 2025
0ac6914
feat: globally unique ID generation without a database (#636)
levkk Nov 26, 2025
856e329
fix: schema sharding (#641)
levkk Dec 2, 2025
e2753ce
fix: flakey node id test
levkk Dec 2, 2025
99ae692
feat: handle Aurora in lsn monitor (#642)
levkk Dec 3, 2025
345bd28
Fix aggregate group by count (#645)
mijoharas Dec 4, 2025
ea620b7
fix: role detection; feat: set inside transactions (#647)
levkk Dec 4, 2025
e1dbbad
v0.1.17
levkk Dec 4, 2025
f450020
feat: change server address logging format to include user (#650)
levkk Dec 4, 2025
18cb5c1
fix: search_path overrides _all_ routing (#651)
levkk Dec 5, 2025
6a7c7c4
fix: protobuf stack overflow; feat: make stack size configurable for …
levkk Dec 5, 2025
36f85a7
fix: persist schema_path route for all commands, incl. set (#655)
levkk Dec 6, 2025
1a63c5e
fix: time averages were completely wrong (#659)
levkk Dec 7, 2025
1a5ed2b
fix: prevent divizion by zero (#660)
levkk Dec 7, 2025
2b431c7
feat: support subqueries for shard selection (#657)
levkk Dec 8, 2025
8482bf2
fix: refactor of DELETE removed schema sharding (#661)
levkk Dec 8, 2025
8dd51c3
Multiple fixes (#662)
levkk Dec 9, 2025
0182f8e
feat: add reason for connection closing (#664)
levkk Dec 9, 2025
6704336
feat: support target_session_attrs (partial) (#665)
levkk Dec 9, 2025
2df57f8
fix: target_session_attrs don't get passed in, use pgdog.role (#666)
levkk Dec 9, 2025
bd8dbc8
fix: parameter encoding/decoding & set local (#669)
levkk Dec 10, 2025
2293ed8
feat: log startup parameters in debug mode (#670)
levkk Dec 10, 2025
2e50c8e
chore: add connect reason (#672)
levkk Dec 11, 2025
d66bf90
chore: log pool info on new connection creation (#673)
levkk Dec 11, 2025
6bf5483
Multiple fixes and refactor (#674)
levkk Dec 11, 2025
376d2b2
v0.1.18
levkk Dec 12, 2025
e50b227
chore: be slightly more defensive when checking if the pool is full (…
samaross Dec 12, 2025
c0d41a1
fix: correctly quote empty parameter values (#678)
levkk Dec 14, 2025
bf62c96
fix: respect prepared_statements setting (#679)
levkk Dec 14, 2025
84d61cf
fix: parameter json encoding (#681)
levkk Dec 15, 2025
487cceb
Mark protocol state in Error when out of sync detected (#668)
jbielick Dec 15, 2025
9d7395d
Recompute the parameters hash when the params are cleared (#682)
LexVar Dec 16, 2025
3a11d36
Rewrite engine 3.0 (#676)
levkk Dec 18, 2025
8ae2a75
chore: add param reset test & tag release (#683)
levkk Dec 18, 2025
bab5bce
fix: handle SET after query inside transaction correctly with schema …
levkk Dec 18, 2025
4a98721
v0.1.20
levkk Dec 19, 2025
77698af
fix: SET TRANSACTION was captured as a session parameter (#686)
levkk Dec 19, 2025
f4f3689
fix: save SET parameter after a regular query inside transaction (#687)
levkk Dec 19, 2025
4d7c940
chore: add required tools via mise (#648)
mijoharas Dec 19, 2025
93cdc2d
Create SECURITY.md
levkk Dec 23, 2025
4f5a65b
multi: sharding key update improvements + bug fixes (#688)
levkk Dec 24, 2025
e29a840
fix: handle expressions in shard key UPDATE statements (#692)
levkk Dec 24, 2025
8fe24fd
feat: make query parser optional for load balancing (#693)
levkk Dec 25, 2025
2a8e4d1
v0.1.21 (#694)
levkk Dec 25, 2025
3fea924
feat: client_idle_in_transaction_timeout (#696) (#697)
levkk Dec 30, 2025
6fd1c96
fix: escape parameter values in SET queries (#698)
levkk Dec 31, 2025
42df93f
feat: query parser backend without protobuf in pg_query (#699)
levkk Jan 2, 2026
692883f
v0.1.22 (#700)
levkk Jan 2, 2026
8e5396e
fix: SET pgdog.sharding_key was ignoring schema sharding (#701)
levkk Jan 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 8 additions & 1 deletion .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,19 @@ flags:
carryforward: true
integration:
paths:
- integration
- pgdog
- pgdog-plugin
- pgdog-macros
- pgdog-plugin-build
- plugins
carryforward: false

ignore:
- "**/tests/**"
- "**/examples/**"
- integration/python/venv

fixes:
- "/home/runner/_work/pgdog/pgdog/::"

slack_app: true
72 changes: 69 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: ci
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

jobs:
fmt:
Expand Down Expand Up @@ -76,7 +80,7 @@ jobs:
RUSTFLAGS: "-C link-dead-code"
run: |
cargo llvm-cov clean --workspace
cargo llvm-cov nextest --lcov --output-path lcov.info --no-fail-fast --test-threads=1 --filter-expr "package(pgdog)"
cargo llvm-cov nextest --lcov --output-path lcov.info --no-fail-fast --test-threads=1 --filter-expr "package(pgdog) | package(pgdog-config) | package(pgdog-vector)"
- name: Run documentation tests
run: cargo test --doc
# Requires CODECOV_TOKEN secret for upload
Expand All @@ -89,6 +93,7 @@ jobs:
fail_ci_if_error: true
integration:
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 30
env:
LLVM_PROFILE_FILE: ${{ github.workspace }}/target/llvm-cov-target/profiles/pgdog-%p-%m.profraw
steps:
Expand All @@ -108,6 +113,7 @@ jobs:
sudo -u postgres createdb $USER
sudo -u postgres psql -c 'ALTER SYSTEM SET max_connections TO 1000;'
sudo -u postgres psql -c 'ALTER SYSTEM SET max_prepared_transactions TO 1000;'
sudo -u postgres psql -c 'ALTER SYSTEM SET wal_level TO logical;'
sudo service postgresql restart
bash integration/setup.sh
sudo apt update && sudo apt install -y python3-virtualenv mold
Expand Down Expand Up @@ -140,6 +146,8 @@ jobs:
echo "PGDOG_BIN=$(realpath "$BIN_PATH")" >> "$GITHUB_ENV"
- name: pgbench
run: bash integration/pgbench/run.sh
- name: schema-sync
run: bash integration/schema_sync/run.sh
- name: Go
run: bash integration/go/run.sh
- name: JavaScript
Expand All @@ -156,6 +164,8 @@ jobs:
run: bash integration/rust/run.sh
- name: Stop shared PgDog
run: bash -lc 'source integration/common.sh; stop_pgdog'
- name: Data sync
run: bash integration/copy_data/dev.sh
- name: Python
run: bash integration/python/run.sh
- name: Load balancer
Expand All @@ -164,8 +174,6 @@ jobs:
run: bash integration/complex/run.sh
- name: Dry run
run: bash integration/dry_run/run.sh
# - name: Plugins
# run: bash integration/plugins/run.sh
- name: Ensure PgDog stopped
run: |
if pgrep -x pgdog > /dev/null; then
Expand All @@ -182,3 +190,61 @@ jobs:
files: integration.lcov
flags: integration
fail_ci_if_error: true
plugin-unit-tests:
runs-on: blacksmith-4vcpu-ubuntu-2404
continue-on-error: true
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: useblacksmith/rust-cache@v3
with:
prefix-key: "plugin-unit-v1"
- name: Install CMake 3.31
run: |
sudo apt-get install -y mold
sudo apt remove cmake
sudo pip3 install cmake==3.31.6
cmake --version
- name: Install test dependencies
run: cargo install cargo-nextest --version "0.9.78" --locked
- name: Run plugin unit tests
run: cargo nextest run -E 'package(pgdog-example-plugin)' --no-fail-fast
plugin-integration-tests:
runs-on: blacksmith-4vcpu-ubuntu-2404
continue-on-error: true
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: useblacksmith/rust-cache@v3
with:
prefix-key: "plugin-integration-v1"
- name: Setup PostgreSQL
run: |
sudo service postgresql start
sudo -u postgres createuser --superuser --login $USER
sudo -u postgres createdb $USER
bash integration/setup.sh
- name: Install dependencies
run: |
sudo apt update && sudo apt install -y python3-virtualenv mold
sudo gem install bundler
sudo apt remove -y cmake
sudo pip3 install cmake==3.31.6
cmake --version
cargo install cargo-nextest --version "0.9.78" --locked
- name: Build plugin
run: |
cargo build --release
pushd plugins/pgdog-example-plugin
cargo build --release
popd
- name: Run plugin integration tests
run: bash integration/plugins/run.sh
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Run `cargo check` for a quick type pass, and `cargo build` to compile local bina

## Coding Style & Naming Conventions
Follow Rust conventions: modules and functions in `snake_case`, types in `UpperCamelCase`, constants in `SCREAMING_SNAKE_CASE`. Keep modules under ~200 lines unless justified. Format with `cargo fmt` and lint using `cargo clippy --all-targets --all-features` before posting a PR.
Prefer keeping `#[cfg(test)]` blocks at the end of a file; only place `#[cfg(test)]` imports directly beneath normal imports when that keeps the module tidy.

## Testing Guidelines
Adhere to TDD—write the failing test first, implement minimally, then refactor. Co-locate unit tests with their crates, reserving heavier scenarios for `integration/` against the prepared-transaction Postgres stack. Invoke `cargo nextest run --test-threads=1 <test>` for focused iterations; gate Kerberos coverage behind `--features gssapi`. Do **not** run `cargo test`; Nextest with a single-thread budget is the required harness.
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- `cargo check` to test that the code compiles. It shouldn't contain warnings. This is quicker than `cargo build`.
- `cargo fmt` to reformat code according to Rust standards.
- `cargo nextest run --test-threads=1 <test name>` to run a specific test
- `cargo nextest run --test-threads=1 <test name>` to run a specific test. Run `pgdog` tests from the `pgdog` directory (`cd pgdog` first).
- `cargo nextest run --test-threads=1 --no-fail-fast` to run all tests. Make sure to use `--test-threads=1` because some tests conflict with each other.

# Code style
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Contributions are welcome. If you see a bug, feel free to submit a PR with a fix

## Necessary crates - cargo install <name>

(if you use mise, these can be installed with `mise install`)
- cargo-nextest
- cargo-watch

Expand Down
Loading
Loading