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: docs/src/postgresql_conf.md
+40-14Lines changed: 40 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -182,6 +182,7 @@ As anticipated in the previous section, Cloud Native PostgreSQL automatically
182
182
manages the content in `shared_preload_libraries` for some well-known and
183
183
supported extensions. The current list includes:
184
184
185
+
-`auto_explain`
185
186
-`pg_stat_statements`
186
187
-`pgaudit`
187
188
@@ -201,6 +202,30 @@ SELECT datname FROM pg_database WHERE datallowconn
201
202
!!! Note
202
203
The above query also includes template databases like `template1`.
203
204
205
+
#### Enabling `auto_explain`
206
+
207
+
The [`auto_explain`](https://www.postgresql.org/docs/current/auto-explain.html)
208
+
extension provides a means for logging execution plans of slow statements
209
+
automatically, without having to manually run `EXPLAIN` (helpful for tracking
210
+
down un-optimized queries).
211
+
212
+
You can enable `auto_explain` by adding to the configuration a parameter
213
+
that starts with `auto_explain.` as in the following example excerpt (which
214
+
automatically logs execution plans of queries that take longer than 10 seconds
215
+
to complete):
216
+
217
+
```yaml
218
+
# ...
219
+
postgresql:
220
+
parameters:
221
+
auto_explain.log_min_duration: "10s"
222
+
# ...
223
+
```
224
+
225
+
!!! Note
226
+
Enabling auto_explain can lead to performance issues. Please refer to [`the auto explain documentation`](https://www.postgresql.org/docs/current/auto-explain.html)
227
+
228
+
204
229
#### Enabling `pg_stat_statements`
205
230
206
231
The [`pg_stat_statements`](https://www.postgresql.org/docs/current/pgstatstatements.html)
@@ -224,24 +249,25 @@ As explained previously, the operator will automatically add
224
249
NOT EXISTS pg_stat_statements` on each database, enabling you to run queries
225
250
against the `pg_stat_statements` view.
226
251
227
-
#### Enabling `auto_explain`
252
+
#### Enabling `pgaudit`
228
253
229
-
The [`auto_explain`](https://www.postgresql.org/docs/current/auto-explain.html)
230
-
extension provides a means for logging execution plans of slow statements
231
-
automatically, without having to manually run `EXPLAIN` (helpful for tracking
232
-
down un-optimized queries).
254
+
The `pgaudit` extension provides detailed session and/or object audit logging via the standard PostgreSQL logging facility.
233
255
234
-
You can enable `auto_explain` by adding to the configuration a parameter
235
-
that starts with `auto_explain.` as in the following example excerpt (which
236
-
automatically logs execution plans of queries that take longer than 10 seconds
237
-
to complete):
256
+
Cloud Native PostgreSQL has transparent and native support for
257
+
[PGAudit](https://www.pgaudit.org/) on PostgreSQL clusters. For further information, please refer to the ["PGAudit" logs section.](logging.md#pgaudit-logs)
258
+
259
+
You can enable `pgaudit` by adding to the configuration a parameter
260
+
that starts with `pgaudit.` as in the following example excerpt:
0 commit comments