mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
feat(upgrade): surface btree_gist NaN reindex warning (#49684)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Feature — studio counterpart of supabase/platform#37696 (PG 15.19/17.11 release, PSQL-1247). ## What is the current behavior? The pre-upgrade warnings panel handles `ltree_reindex_required` and `operator_estimator_gate` only. ## What is the new behavior? Adds the `btree_gist_nan_reindex` warning (title, description, docs link) emitted by the eligibility endpoint when a project has btree_gist indexes on float columns and the upgrade crosses the 15.19/17.11 NaN-handling fix. Non-blocking, same pattern as #47003. `api-v1.d.ts` union extended to match the platform spec. ## Additional context Docs anchor targets the section added in #49621 — merge that first (or together). Refs PSQL-1247. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added an upgrade warning for the `btree_gist_nan_reindex` requirement. * Included a description and link to relevant documentation for guidance. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
1 parent
b917b0e1bf
commit
0c8dc73bf4
2 files changed
+10
No files matched your search
@@ -164,6 +164,8 @@ const getWarningTitle = (warning: ProjectUpgradeEligibilityWarning): string => {
|
||||
return 'ltree indexes must be reindexed after this upgrade'
|
||||
case 'operator_estimator_gate':
|
||||
return 'Custom operators may need attention after this upgrade'
|
||||
case 'btree_gist_nan_reindex':
|
||||
return 'btree_gist indexes on float columns must be reindexed after this upgrade'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,6 +177,8 @@ const getWarningDescription = (warning: ProjectUpgradeEligibilityWarning): strin
|
||||
return 'After upgrading, ltree indexes on this database can return incomplete results until they are rebuilt. Run `REINDEX INDEX CONCURRENTLY` on the affected indexes — this runs online with no downtime.'
|
||||
case 'operator_estimator_gate':
|
||||
return 'After upgrading, recreating an operator that references a non-built-in selectivity estimator (for example during a restore or branch) requires superuser and may fail. Most projects are not affected.'
|
||||
case 'btree_gist_nan_reindex':
|
||||
return 'After upgrading, btree_gist indexes on float columns can return wrong results for rows containing NaN until they are rebuilt. If those columns may contain NaN values, run `REINDEX INDEX CONCURRENTLY` on the affected indexes — this runs online with no downtime.'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,6 +190,8 @@ const getWarningLink = (warning: ProjectUpgradeEligibilityWarning): string => {
|
||||
return `${DOCS_URL}/guides/platform/upgrading#ltree-indexes-require-reindexing-after-upgrade`
|
||||
case 'operator_estimator_gate':
|
||||
return `${DOCS_URL}/guides/platform/upgrading#custom-operator-selectivity-estimators`
|
||||
case 'btree_gist_nan_reindex':
|
||||
return `${DOCS_URL}/guides/platform/upgrading#btree_gist-indexes-on-float-columns-require-reindexing-after-upgrade`
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+4
@@ -4045,6 +4045,10 @@ export interface components {
|
||||
/** @enum {string} */
|
||||
type: 'operator_estimator_gate'
|
||||
}
|
||||
| {
|
||||
/** @enum {string} */
|
||||
type: 'btree_gist_nan_reindex'
|
||||
}
|
||||
)[]
|
||||
}
|
||||
ProjectUpgradeInitiateResponse: {
|
||||
|
||||
Reference in new issue
Block a user