Skip to content
Merged
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
3 changes: 3 additions & 0 deletions docs/configuration/pgdog.toml/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,14 @@ Available options:
- `include_primary`
- `exclude_primary`
- `include_primary_if_replica_banned`
- `prefer_primary`

`include_primary` uses the primary database as well as the replicas to serve read queries. `exclude_primary` will send all read queries to replicas, leaving the primary to serve only writes.

`include_primary_if_replica_banned` strategy will only send reads to the primary if one or more replicas have been banned. This is useful in case you want to use the primary as a failover for reads.

`prefer_primary` will route all queries to the primary unless you explicitely set the `pgdog.role` session parameter or the `/* pgdog_role */` comment to `replica`.

Default: **`include_primary`**

### `healthcheck_port`
Expand Down
Loading