Allow setting null for connection pool size (#50726)

## Context

Allows users to "reset" the value for connection pool size in pooler
configuration under [database
settings](http://supabase.com/dashboard/project/_/database/settings)
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/4eb98088-1898-423c-8ef6-655fd0573601"
/>

Refer to the [Linear
ticket](https://linear.app/supabase/issue/FE-4425/support-setting-null-for-pool-size-in-pooler-config)
for more details about why this change is needed - its a bit of an
explanation 😅 🙏

## To test
- [ ] Verify that you can save a pool size, and that the GET
`/config/pgbouncer` network request returns `default_pool_size` property
in its response
- [ ] Verify that you can save while leaving the pool size input field
empty, and that the GET `/config/pgbouncer` network request thereafter
doesn't return `default_pool_size` in its response

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Preserved the intended database connection pool setting when no
default pool size is specified, rather than automatically applying a
compute-size-based value.
  * Explicitly entered pool sizes continue to be saved unchanged.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Joshen Lim authored and GitHub committed 2026-09-24 01:12:19 +08:00
1 parent 1fe40e5706
commit 5b18f1d084
2 files changed
+13 -1

No files matched your search

@@ -129,7 +129,7 @@ export const ConnectionPooling = () => {
updatePoolerConfig(
{
ref: projectRef,
default_pool_size: default_pool_size === undefined ? defaultPoolSize : default_pool_size,
default_pool_size: default_pool_size === undefined ? null : default_pool_size,
ignore_startup_parameters: ignoreStartupParameters ?? '',
},
{
+12
View File
@@ -6326,6 +6326,10 @@ export interface components {
branch_limit?: number
installation_id: number
new_branch_per_pr?: boolean
/**
* @description Project ref
* @example abcdefghijklmnopqrst
*/
project_ref: string
repository_id: number
supabase_changes_only?: boolean
@@ -7851,6 +7855,10 @@ export interface components {
metadata: {
[key: string]: unknown
}
/**
* @description Project ref
* @example abcdefghijklmnopqrst
*/
supabase_project_ref: string
}
organization_integration_id: string
@@ -7861,6 +7869,10 @@ export interface components {
metadata: {
[key: string]: unknown
}
/**
* @description Organization slug
* @example tsrqponmlkjihgfedcba
*/
organization_slug: string
source: string
teamId?: string