Skip to content

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

fix: updateConfig with allowed props

phamhieu2af896b23f8f
diff --git a/studio/components/interfaces/Settings/Database/ConnectionPooling.tsx b/studio/components/interfaces/Settings/Database/ConnectionPooling.tsx
index ee96bbf7b54..b9d6b89725c 100644
--- a/studio/components/interfaces/Settings/Database/ConnectionPooling.tsx
+++ b/studio/components/interfaces/Settings/Database/ConnectionPooling.tsx
@@ -140,10 +140,13 @@ export const PgbouncerConfig: FC<ConfigProps> = observer(
const updateConfig = async (updatedConfig: any) => {
try {
- const response = await patch(
- `${API_URL}/projects/${projectRef}/config/pgbouncer`,
- updatedConfig
- )
+ const response = await patch(`${API_URL}/projects/${projectRef}/config/pgbouncer`, {
+ pgbouncer_enabled: updatedConfig.pgbouncer_enabled,
+ default_pool_size: updatedConfig.default_pool_size,
+ ignore_startup_parameters: updatedConfig.ignore_startup_parameters,
+ pool_mode: updatedConfig.pool_mode,
+ max_client_conn: updatedConfig.max_client_conn,
+ })
if (response.error) {
throw response.error
} else {