Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: update docs on pgaudit and added notes

TzeYiing4b0eaccdd016
diff --git a/apps/docs/pages/guides/platform/logs.mdx b/apps/docs/pages/guides/platform/logs.mdx
index 61c04d6cea8..f1ca79b5017 100644
--- a/apps/docs/pages/guides/platform/logs.mdx
+++ b/apps/docs/pages/guides/platform/logs.mdx
@@ -89,16 +89,16 @@ The Logs tab displays logs emitted during function execution.
By default, query logs are disabled for new Supabase projects, as they can reveal metadata about the contents of your database (such as table and column names).
-To enable query logs, enable and configure the [pgAudit extension](https://www.pgaudit.org/):
+To enable query logs:
1. [Enable the pgAudit extension](https://app.supabase.com/project/_/database/extensions).
2. [Restart your project](https://app.supabase.com/project/_/settings/general) using the **Fast database reboot** option.
3. Configure `pgaudit.log` (see below). Perform a fast reboot if needed.
4. View your query logs under [Logs > Postgres Logs](https://app.supabase.com/project/_/logs/postgres-logs).
-### Configuring `pgaudit.log` {#configuring-pgaudit-log}
+### Configuring `pgaudit.log`
-The stored value under `pgaudit.log` determines the classes of statements that are logged by pgAudit. Refer to the pgAudit documentation for the [full list of values](https://github.com/pgaudit/pgaudit/blob/master/README.md#pgauditlog).
+The stored value under `pgaudit.log` determines the classes of statements that are logged by [pgAudit extension](https://www.pgaudit.org/). Refer to the pgAudit documentation for the [full list of values](https://github.com/pgaudit/pgaudit/blob/master/README.md#pgauditlog).
To enable logging for function calls/do blocks, writes, and DDL statements for a single session, execute the following within the session:
@@ -121,6 +121,12 @@ To reset system-wide settings, execute the following, then perform a fast reboot
alter role postgres reset pgaudit.log
```
+<Admonition type="note">
+
+If any permission errors are encountered when executing `alter role postgres ...`, it is likely that your project has yet to receive the patch to the latest version of [`supautils`](https://github.com/supabase/supautils), which is currently being rolled out.
+
+</Admonition>
+
## Logs Explorer
The [Logs Explorer](https://app.supabase.com/project/_/logs-explorer) exposes logs from each part of the Supabase stack as a separate table that can be queried and joined using SQL.