-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Session mode | ||
|
||
In session mode, pgDog allocates one PostgreSQL server connection per client. This ensures that all PostgreSQL features work as expected, including persistent session variables, settings, and | ||
process-based features like `LISTEN`/`NOTIFY`. Some batch-based tasks, like ingesting large amounts of data, perform better in session mode. | ||
|
||
## Enable session mode | ||
|
||
Session mode can be enabled globally or on a per-user basis: | ||
|
||
=== "pgdog.toml" | ||
```toml | ||
[general] | ||
pooler_mode = "session" | ||
``` | ||
=== "users.toml" | ||
```toml | ||
[[users]] | ||
name = "pgdog" | ||
database = "pgdog" | ||
pooler_mode = "session" | ||
``` | ||
|
||
## Performance | ||
|
||
Unlike [transaction mode](transaction-mode.md), session mode doesn't allow for client/server connection multiplexing, so the maximum number of allowed client connections | ||
is controlled by the `default_pool_size` (and `pool_size`) settings. For example, if your database pool size is 15, | ||
only 15 clients will be able to connect and use the database at any given moment. | ||
|
||
!!! note | ||
In session mode, when the connection pool reaches full capacity, a client has to disconnect before another one can connect to pgDog. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters