You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/install-pgbouncer/index.mdx
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,11 @@ categories:
10
10
- instances
11
11
- postgresql-and-mysql
12
12
dates:
13
-
validation: 2024-06-03
13
+
validation: 2024-12-12
14
14
posted: 2022-02-24
15
15
---
16
16
17
-
PgBouncer is a connection pooler for PostgreSQL. It sits between the application and the PostgreSQL server. PgBouncer opens multiple connections to the database and serves it to the application. This reduces connection opening costs for the application and gives a performance boost.
17
+
[PgBouncer](https://www.pgbouncer.org/) is a connection pooler for [PostgreSQL](https://www.postgresql.org/). It sits between the application and the PostgreSQL server. PgBouncer opens multiple connections to the database and serves it to the application. This reduces connection opening costs for the application and gives a performance boost.
18
18
19
19
There are three types of pooling modes:
20
20
- Session: The server connection will be released back to the pool after the client disconnects. (Default pooling method.)
@@ -35,7 +35,7 @@ In this tutorial, you can choose the pooling mode that best suits your workload.
35
35
36
36
The **PostgreSQL Global Development Group (PGDG)** provides an apt repository. After importing the repository, you can install the PgBouncer package.
37
37
38
-
1.ImportthePDGGrepositorysigningkey:
38
+
1.ImportthePGDGrepositorysigningkey:
39
39
```
40
40
sudo apt install curl ca-certificates
41
41
sudo install -d /usr/share/postgresql-common/pgdg
@@ -133,7 +133,7 @@ Here are a few commands that can be used after connecting to the `pgbouncer` dat
133
133
134
134
## Doing an online restart
135
135
136
-
-You can do an online restart without terminating the connections. PgBouncer launches a new process and loads open sockets from running PgBouncer. After that, the old process is stopped and the new process resumes. This way, connections are not interrupted. This is very useful when upgrading PgBouncer.
136
+
You can do an online restart without terminating the connections. PgBouncer launches a new process and loads open sockets from running PgBouncer. After that, the old process is stopped and the new process resumes. This way, connections are not interrupted. This is very useful when upgrading PgBouncer.
@@ -150,17 +150,17 @@ Here are a few commands that can be used after connecting to the `pgbouncer` dat
150
150
max_client_conn = max_client_conn + (max pool_size * total databases * total users)
151
151
```
152
152
153
-
- You may want to increase this number to 5 or 10. When the specified `pool_size` is not enough, it uses the reserved pool and logs it. It can be used to determine `pool_size`. (Default: 0)
153
+
- You can set this value to 5 or 10. When the specified `pool_size` is not enough, it uses the reserved pool and logs it. It can be used to determine `pool_size`. (Default: 0)
154
154
```
155
155
reserve_pool_size = 10
156
156
```
157
157
158
-
- Connecting to PostgreSQL through PgBouncer will mask the PostgreSQL IP. This setting adds the client host address and port to the application name. It is very helpful when troubleshooting. (Default: 0)
158
+
- Connecting to PostgreSQL through PgBouncer will mask the PostgreSQL IP. This setting adds the client host address and port to the application name, which can be helpful when troubleshooting. (Default: 0)
159
159
```
160
160
application_name_add_host = 1
161
161
```
162
162
163
-
- By default, PgBouncer reuses server connections in LIFO (last-in, first-out). If you are using a TCP load balancer with a round-robin behind the PostgreSQL IP address, you may want to enable `server_round_robin` to achieve higher performance. (Default: 1)
163
+
- By default, PgBouncer reuses server connections in LIFO (last-in, first-out). If you are using a TCP load balancer with a round-robin behind the PostgreSQL IP address, enable `server_round_robin` to achieve higher performance. (Default: 1)
0 commit comments