Skip to content

Commit 59627b9

Browse files
authored
Reclaim space from buffer after every request (#592)
* Reclaim space from buffer after every request * Dont delete data actually * Memory optimization * Ok * make memory configurable * Fix tests * fix test * update total * Reclaim buffer space once per request * Fix tests * fix reload test * Fix test * Postgres 18 broke something * run on forks
1 parent 319acb5 commit 59627b9

34 files changed

Lines changed: 913 additions & 439 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: ci
22
on:
33
push:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
46

57
jobs:
68
fmt:
@@ -89,6 +91,7 @@ jobs:
8991
fail_ci_if_error: true
9092
integration:
9193
runs-on: blacksmith-4vcpu-ubuntu-2404
94+
timeout-minutes: 30
9295
env:
9396
LLVM_PROFILE_FILE: ${{ github.workspace }}/target/llvm-cov-target/profiles/pgdog-%p-%m.profraw
9497
steps:

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration/load_balancer/docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
services:
22
primary:
3-
image: postgres:18
3+
image: postgres:17
44
environment:
55
POSTGRES_PASSWORD: postgres
66
volumes:
77
- ./docker/primary.sh:/docker-entrypoint-initdb.d/setup.sh
88
ports:
99
- 45000:5432
1010
replica_1:
11-
image: postgres:18
11+
image: postgres:17
1212
environment:
1313
POSTGRES_PASSWORD: postgres
1414
volumes:
@@ -20,7 +20,7 @@ services:
2020
ports:
2121
- 45001:5432
2222
replica_2:
23-
image: postgres:18
23+
image: postgres:17
2424
environment:
2525
POSTGRES_PASSWORD: postgres
2626
volumes:

integration/pgdog.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ healthcheck_port = 8080
2121
tls_certificate = "integration/tls/cert.pem"
2222
tls_private_key = "integration/tls/key.pem"
2323

24+
[memory]
25+
net_buffer = 8096
26+
message_buffer = 8096
27+
2428
[rewrite]
2529
enabled = false
2630
shard_key = "ignore"

integration/rust/tests/integration/tls_enforced.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,6 @@ async fn test_tls_enforced() {
2828

2929
opts_tls.connect().await.unwrap();
3030
assert!(opts_notls.connect().await.is_err());
31+
// Reset settings.
32+
admin.execute("RELOAD").await.unwrap();
3133
}

0 commit comments

Comments
 (0)