diff --git a/apps/docs/pages/guides/platform/database-size.mdx b/apps/docs/pages/guides/platform/database-size.mdx index 552d3b9c487..3edb38caf24 100644 --- a/apps/docs/pages/guides/platform/database-size.mdx +++ b/apps/docs/pages/guides/platform/database-size.mdx @@ -89,11 +89,28 @@ In read-only mode, clients will encounter errors such as `cannot execute INSERT You can manually override read-only mode to reduce disk size. To do this, run the following in the [SQL Editor](https://supabase.com/dashboard/project/_/sql): +To change the [transaction access mode](https://www.postgresql.org/docs/current/sql-set-transaction.html) for the current transaction: + ```sql SET TRANSACTION READ WRITE; ``` This allows you to delete data from within the session. After deleting data, you should run a vacuum to reclaim as much space as possible. +You can also change the default transaction access mode for all subsequent transactions of a session: + +```sql +SET SESSION CHARACTERISTICS AS TRANSACTION READ WRITE; +``` +Ater deleting data, you should run a vacuum to reclaim as much space as possible. + +```sql +VACUUM; +``` +After completing this in a session, then you can run the following to disable [read-only](https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-DEFAULT-TRANSACTION-READ-ONLY) mode: + +```SQL +SET default_transaction_read_only = 'off'; +``` export const Page = ({ children }) =>