The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
docs: update postgres queries wording
TzeYiing272a73646475
diff --git a/apps/docs/pages/guides/platform/logs.mdx b/apps/docs/pages/guides/platform/logs.mdxindex cd716905100..eb2d6a81c28 100644--- a/apps/docs/pages/guides/platform/logs.mdx+++ b/apps/docs/pages/guides/platform/logs.mdx@@ -89,28 +89,37 @@ The Logs tab displays logs emitted during function execution.### Logging Postgres Queries-By default, query logs are disabled for all new Supabase projects, as they can reveal metadata about the contents of your database (e.g. table and column names). To enable query logs, enable and configure the [pgAudit extension](https://www.pgaudit.org/):+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/):1. [Enable the pgAudit extension](https://app.supabase.com/project/_/database/extensions)-2. [Reboot the database](https://app.supabase.com/project/_/settings/general); a "Fast database reboot" is sufficient, and faster than a full project restart-3. Configure `pgaudit.log` to the [appropriate value](https://github.com/pgaudit/pgaudit/blob/master/README.md#pgauditlog)-4. View your query logs under [Logs > Postgres Logs](https://app.supabase.com/project/_/logs/postgres-logs) now+2. [Perform a "Fast database reboot"](https://app.supabase.com/project/_/settings/general)+3. Configure `pgaudit.log` (see below). Perform another reboot if needed.+4. View your query logs under [Logs > Postgres Logs](https://app.supabase.com/project/_/logs/postgres-logs)++#### Configuring `pgaudit.log`++The stored value under `pgaudit.log` determines the classes of statements that wll be logged by pgAudit. Refer to the pgAudit documentation for the [full list of values](https://github.com/pgaudit/pgaudit/blob/master/README.md#pgauditlog)-For example, to enable logs for writes and DDL statements for a single session, execute the following within the session:+To enable logging for function calls/do blocks, writes and DDL statements for a single session, execute the following within the session:```sql-set pgaudit.log = 'write, ddl';+-- temporary single-session config update+set pgaudit.log = 'function, write, ddl';```-To _permanently_ enable logs for all statements that relate to roles and privileges (followed by a reboot):+To _permanently_ set a logging configuration (beyond a single session), execute the following, then perform a reboot:```sql-alter system set pgaudit.log to 'role';+-- equivalent permanent config update. Reboot is needed+alter system set pgaudit.log to 'function, write, ddl';```-To remove a system-wide setting (followed by a reboot):+To reset system-wide settings, execute the following, then perform a reboot:```sql+-- resets stored config. Reboot is needed.alter system reset pgaudit.log;```