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
65 changes: 33 additions & 32 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
push:
branches: [main]
pull_request:
branches: [main]
jobs:
verify-tomls:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install
working-directory: ci/bun

- name: Collect snippets
run: bun run ci/bun/scripts/collectSnippets.ts

- name: Verify snippets
run: bash ci/bash/verify_snippets.bash

- name: Upload log artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: verification-log
path: verification-log.json
verify-tomls:
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout another public repo
uses: actions/checkout@v4
with:
repository: pgdogdev/pgdog
ref: main
path: pgdog-source
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install CMake 3.31
run: |
sudo apt update && sudo apt install mold -y
sudo apt remove cmake
sudo pip3 install cmake==3.31.6
cmake --version
- name: Build
run: cargo build
working-directory: pgdog-source
- name: Install test dependencies
run: sudo pip3 install -r tests/requirements.txt
- name: Run tests
run: python3 tests/test_code_blocks.py pgdog-source/target/debug/pgdog
45 changes: 0 additions & 45 deletions ci/bash/verify_snippets.bash

This file was deleted.

29 changes: 0 additions & 29 deletions ci/bun/bun.lock

This file was deleted.

12 changes: 0 additions & 12 deletions ci/bun/package.json

This file was deleted.

131 changes: 0 additions & 131 deletions ci/bun/scripts/collectSnippets.ts

This file was deleted.

27 changes: 0 additions & 27 deletions ci/bun/tsconfig.json

This file was deleted.

1 change: 1 addition & 0 deletions docs/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Most settings can be reloaded without restarting PgDog. This allows you to tweak
To make things simpler, all units of time are in milliseconds. For example, if you want to set the pool checkout timeout to 5 seconds, convert it to 5000ms instead:

```toml
[general]
checkout_timeout = 5_000
```

Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/pgdog.toml/mirroring.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For example:
[[mirroring]]
source_db = "source"
destination_db = "dest"
queue_depth = 500
queue_length = 500
exposure = 0.1
```

Expand Down
1 change: 1 addition & 0 deletions docs/configuration/pgdog.toml/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ name is `router`, PgDog will look for `librouter.so` on Linux, `librouter.dll` o
Additionally, you can pass the relative or absolute path to the shared library itself:

```toml
[[plugins]]
name = "/opt/plugins/librouter.so"
```

Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/pgdog.toml/sharded_tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The following configuration will match queries referring to this exact table and
```toml
[[sharded_tables]]
database = "prod"
table = "users"
name = "users"
column = "id"
data_type = "bigint"
```
Expand Down
4 changes: 4 additions & 0 deletions docs/features/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ PgDog will expect clients connecting as `pgdog` to provide the password `hunter2
You can override the user and/or password PgDog uses to connect to Postgres by specifying `server_user` and `server_password` in the same configuration:

```toml
[[users]]
name = "pgdog"
password = "hunter2"
database = "pgdog"
server_user = "bob"
server_password = "opensesame"
```
Expand Down
3 changes: 2 additions & 1 deletion docs/features/load-balancer/healthchecks.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Databases are automatically put back into the load balancer after a period of ti
The amount of time the database is banned from serving traffic is controlled with the `ban_timeout` setting:

```toml
[general]
ban_timeout = 300_000 # 5 minutes
```

Expand All @@ -101,7 +102,7 @@ By default, the load balancer gives the database a limited amount of time to ans
This behavior is configurable with the `healthcheck_timeout` setting:

```toml
[global]
[general]
healthcheck_timeout = 5_000 # 5 seconds in ms
```

Expand Down
2 changes: 2 additions & 0 deletions docs/features/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ The default value for most PostgreSQL connection drivers is typically `prefer`,
By default, PgDog will attempt to use TLS when connecting to PostgreSQL. This is configurable via a setting:

```toml
[general]
tls_verify = "prefer"
```

Expand All @@ -62,6 +63,7 @@ This setting accepts almost identical values to the `sslmode` parameter used by
If you use `verify_ca` or `verify_full` and your certificate is not signed by a well known CA, you can configure PgDog to validate it using your own certificate chain:

```toml
[general]
tls_server_ca_certificate = "/path/to/ca/certificate.pem"
```

Expand Down
2 changes: 2 additions & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
markdown-it-py
regex
Loading
Loading