diff --git a/apps/docs/content/guides/database/custom-postgres-config.mdx b/apps/docs/content/guides/database/custom-postgres-config.mdx index cacda90ffda7e..d650c5db26352 100644 --- a/apps/docs/content/guides/database/custom-postgres-config.mdx +++ b/apps/docs/content/guides/database/custom-postgres-config.mdx @@ -48,18 +48,24 @@ show "statement_timeout"; Some settings can only be modified by a superuser. Supabase pre-enables the [`supautils` extension](https://supabase.com/blog/roles-postgres-hooks#setting-up-the-supautils-extension), which allows the `postgres` role to retain certain superuser privileges. It enables modification of the below reserved configurations at the `role` level: -| Setting | Description | -| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `auto_explain.log_min_duration` | Logs query plans taking longer than this duration. | -| `auto_explain.log_nested_statements` | Log nested statements' plans. | -| `log_min_messages` | Minimum severity level of messages to log. | -| `pg_net.ttl` | Sets how long the [pg_net extension](/docs/guides/database/extensions/pg_net) saves responses | -| `pg_net.batch_size` | Sets how many requests the [pg_net extension](/docs/guides/database/extensions/pg_net) can make per second | -| `pgaudit.*` | Configures the [PGAudit extension](https://supabase.com/docs/guides/database/extensions/pgaudit). The `log_parameter` is still restricted to protect secrets | -| `pgrst.*` | [`PostgREST` settings](https://docs.postgrest.org/en/stable/references/configuration.html#db-aggregates-enabled) | -| `plan_filter.*` | Configures the [pg_plan_filter extension](https://supabase.com/docs/guides/database/extensions/pg_plan_filter) | -| `session_replication_role` | Sets the session's behavior for triggers and rewrite rules. | -| `track_io_timing` | Collects timing statistics for database I/O activity. | +| Setting | Description | +| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `auto_explain.*` | Configures the [auto_explain module](https://www.postgresql.org/docs/current/auto-explain.html). Can be configured to log execution plans for queries expected to exceed x seconds, including function queries. | +| `log_lock_waits` | Controls whether a log message is produced when a session waits longer than [deadlock_timeout](https://www.postgresql.org/docs/current/runtime-config-locks.html#GUC-DEADLOCK-TIMEOUT) to acquire a lock. | +| `log_min_duration_statement` | Causes the duration of each completed statement to be logged if the statement ran for at least the specified amount of time. | +| `log_min_messages` | Minimum severity level of messages to log. | +| `log_replication_commands` | Logs all replication commands | +| `log_statement` | Controls which SQL statements are logged. Valid values are `none` (off), `ddl`, `mod`, and `all` (all statements). | +| `log_temp_files` | Controls logging of temporary file names and sizes. | +| `pg_net.ttl` | Sets how long the [pg_net extension](/docs/guides/database/extensions/pg_net) saves responses | +| `pg_net.batch_size` | Sets how many requests the [pg_net extension](/docs/guides/database/extensions/pg_net) can make per second | +| `pg_stat_statements.*` | Configures the [pg_stat_statements extension](https://www.postgresql.org/docs/current/pgstatstatements.html). | +| `pgaudit.*` | Configures the [PGAudit extension](https://supabase.com/docs/guides/database/extensions/pgaudit). The `log_parameter` is still restricted to protect secrets | +| `pgrst.*` | [`PostgREST` settings](https://docs.postgrest.org/en/stable/references/configuration.html#db-aggregates-enabled) | +| `plan_filter.*` | Configures the [pg_plan_filter extension](https://supabase.com/docs/guides/database/extensions/pg_plan_filter) | +| `session_replication_role` | Sets the session's behavior for triggers and rewrite rules. | +| `track_io_timing` | Collects timing statistics for database I/O activity. | +| `wal_compression` | This parameter enables compression of WAL using the specified compression method. | For example, to enable `log_nested_statements` for the `postgres` role, execute: diff --git a/apps/docs/content/guides/getting-started/tutorials/with-svelte.mdx b/apps/docs/content/guides/getting-started/tutorials/with-svelte.mdx index 9146ada103c5e..59de68988c966 100644 --- a/apps/docs/content/guides/getting-started/tutorials/with-svelte.mdx +++ b/apps/docs/content/guides/getting-started/tutorials/with-svelte.mdx @@ -17,11 +17,11 @@ If you get stuck while working through this guide, refer to the [full example on ## Building the app -Let's start building the Svelte app from scratch. +Start building the Svelte app from scratch. ### Initialize a Svelte app -We can use the Vite Svelte TypeScript Template to initialize an app called `supabase-svelte`: +You can use the Vite Svelte TypeScript Template to initialize an app called `supabase-svelte`: ```bash npm create vite@latest supabase-svelte -- --template svelte-ts @@ -29,14 +29,14 @@ cd supabase-svelte npm install ``` -Then let's install the only additional dependency: [supabase-js](https://github.com/supabase/supabase-js) +Install the only additional dependency: [supabase-js](https://github.com/supabase/supabase-js) ```bash npm install @supabase/supabase-js ``` -And finally we want to save the environment variables in a `.env`. -All we need are the API URL and the `anon` key that you copied [earlier](#get-the-api-keys). +Finally, save the environment variables in a `.env`. +All you need are the API URL and the `anon` key that you copied [earlier](#get-the-api-keys). <$CodeTabs> @@ -47,221 +47,46 @@ VITE_SUPABASE_ANON_KEY=YOUR_SUPABASE_ANON_KEY $CodeTabs> -Now that we have the API credentials in place, let's create a helper file to initialize the Supabase client. These variables will be exposed -on the browser, and that's completely fine since we have [Row Level Security](/docs/guides/auth#row-level-security) enabled on our Database. +Now you have the API credentials in place, create a helper file to initialize the Supabase client. These variables will be exposed on the browser, and that's fine since you have [Row Level Security](/docs/guides/auth#row-level-security) enabled on the Database. -<$CodeTabs> - -```js name=src/supabaseClient.ts -import { createClient } from '@supabase/supabase-js' - -const supabaseUrl = import.meta.env.VITE_SUPABASE_URL -const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY - -export const supabase = createClient(supabaseUrl, supabaseAnonKey) -``` - -$CodeTabs> +<$CodeSample +path="user-management/svelte-user-management/src/supabaseClient.ts" +meta="name=src/supabaseClient.ts" +/> ### App styling (optional) -An optional step is to update the CSS file `src/app.css` to make the app look nice. -You can find the full contents of this file [here](https://raw.githubusercontent.com/supabase/supabase/master/examples/user-management/svelte-user-management/src/app.css). +Optionally, update the CSS file `src/app.css` to make the app look nice. +You can find the full contents of this file [on GitHub](https://raw.githubusercontent.com/supabase/supabase/master/examples/user-management/svelte-user-management/src/app.css). ### Set up a login component -Let's set up a Svelte component to manage logins and sign ups. We'll use Magic Links, so users can sign in with their email without using passwords. +Set up a Svelte component to manage logins and sign ups. It uses Magic Links, so users can sign in with their email without using passwords. -<$CodeTabs> - -```html name=src/lib/Auth.svelte - - -