mirror of
https://github.com/supabase/supabase.git
synced 2026-06-20 22:06:04 +08:00
chore(docs): add new postgres-config delete command docs (#32982)
* chore(docs): add new postgres-config delete command docs * chore: docs rephrase * chore: rewrite * chore: update common-cli-sections
This commit is contained in:
@@ -151,6 +151,22 @@ postgres-config update --config max_parallel_workers=3 \
|
||||
--replace-existing-overrides
|
||||
```
|
||||
|
||||
To delete specific configuration overrides, use the `postgres-config delete` command:
|
||||
|
||||
```bash
|
||||
supabase --experimental \
|
||||
--project-ref <project-ref> \
|
||||
postgres-config delete --config shared_buffers,work_mem
|
||||
```
|
||||
|
||||
By default, this might restart the database after deleting the configurations. You can use the `--no-restart` flag to prevent the restart:
|
||||
|
||||
```bash
|
||||
supabase --experimental \
|
||||
--project-ref <project-ref> \
|
||||
postgres-config delete --config shared_buffers --no-restart
|
||||
```
|
||||
|
||||
### Resetting to default config
|
||||
|
||||
To reset a setting to its default value at the database level:
|
||||
@@ -171,6 +187,6 @@ alter role "<role_name>" set "<setting_name>" to default;
|
||||
|
||||
### Considerations
|
||||
|
||||
1. Changes through the CLI must restart the database and will cause momentary disruption to existing database connections; in most cases this should not take more than a few seconds. However, you can use the --no-restart flag to bypass the restart and keep the connections intact. Keep in mind that this depends on the specific configuration changes you’re making. if the change requires a restart, using the --no-restart flag will prevent the restart but you won’t see those changes take effect until a restart is manually triggered.
|
||||
1. Changes through the CLI might restart the database causing momentary disruption to existing database connections; in most cases this should not take more than a few seconds. However, you can use the --no-restart flag to bypass the restart and keep the connections intact. Keep in mind that this depends on the specific configuration changes you're making. if the change requires a restart, using the --no-restart flag will prevent the restart but you won't see those changes take effect until a restart is manually triggered.
|
||||
1. Custom Postgres Config will always override the default optimizations generated by Supabase. When changing compute add-ons, you should also review and update your custom Postgres Config to ensure they remain compatible and effective with the updated compute.
|
||||
1. Some parameters (e.g. `wal_keep_size`) can increase disk utilization, triggering disk expansion, which in turn can lead to [increases in your bill](/docs/guides/platform/compute-add-ons#disk-io).
|
||||
|
||||
@@ -1120,12 +1120,15 @@ commands:
|
||||
subcommands:
|
||||
- supabase-postgres-config-get
|
||||
- supabase-postgres-config-update
|
||||
- supabase-postgres-config-delete
|
||||
flags: []
|
||||
- id: supabase-postgres-config-update
|
||||
title: supabase postgres-config update
|
||||
summary: Update Postgres database config
|
||||
description: |-
|
||||
Overriding the default Postgres config could result in unstable database behavior.
|
||||
If you experience instability after changing configurations, you can revert to the default values
|
||||
using the 'postgres-config delete' command.
|
||||
Custom configuration also overrides the optimizations generated based on the compute add-ons in use.
|
||||
tags: []
|
||||
links: []
|
||||
@@ -1154,6 +1157,32 @@ commands:
|
||||
name: --project-ref <string>
|
||||
description: Project ref of the Supabase project.
|
||||
default_value: ''
|
||||
- id: supabase-postgres-config-delete
|
||||
title: supabase postgres-config delete
|
||||
summary: Delete Postgres database config overrides
|
||||
description: Delete specific config overrides, reverting them to their default values.
|
||||
tags: []
|
||||
links: []
|
||||
usage: supabase postgres-config delete [flags]
|
||||
subcommands: []
|
||||
flags:
|
||||
- id: config
|
||||
name: --config <strings>
|
||||
description: Config keys to delete (comma-separated)
|
||||
default_value: '[]'
|
||||
- id: no-restart
|
||||
name: --no-restart
|
||||
description: Do not restart the database after deleting config.
|
||||
default_value: 'false'
|
||||
- id: experimental
|
||||
name: --experimental
|
||||
description: enable experimental features
|
||||
required: true
|
||||
default_value: 'false'
|
||||
- id: project-ref
|
||||
name: --project-ref <string>
|
||||
description: Project ref of the Supabase project.
|
||||
default_value: ''
|
||||
- id: supabase-postgres-config-get
|
||||
title: supabase postgres-config get
|
||||
summary: Get the current Postgres database config overrides
|
||||
|
||||
@@ -840,6 +840,12 @@
|
||||
"title": "Update Postgres configurations",
|
||||
"slug": "supabase-postgres-config-update",
|
||||
"type": "cli-command"
|
||||
},
|
||||
{
|
||||
"id": "supabase-postgres-config-delete",
|
||||
"title": "Delete Postgres configurations",
|
||||
"slug": "supabase-postgres-config-delete",
|
||||
"type": "cli-command"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user