Skip to content

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

feat(upgrade): surface btree_gist NaN reindex warning (#49684)

Utkarash Kumar Singh0c8dc73bf403
diff --git a/apps/studio/components/interfaces/Settings/Infrastructure/UpgradeWarnings.tsx b/apps/studio/components/interfaces/Settings/Infrastructure/UpgradeWarnings.tsx
index a5204a403db..7ebf1c69721 100644
--- a/apps/studio/components/interfaces/Settings/Infrastructure/UpgradeWarnings.tsx
+++ b/apps/studio/components/interfaces/Settings/Infrastructure/UpgradeWarnings.tsx
@@ -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`
}
}
diff --git a/packages/api-types/types/api-v1.d.ts b/packages/api-types/types/api-v1.d.ts
index b7d26dcb49d..1a8ef0636fb 100644
--- a/packages/api-types/types/api-v1.d.ts
+++ b/packages/api-types/types/api-v1.d.ts
@@ -4045,6 +4045,10 @@ export interface components {
/** @enum {string} */
type: 'operator_estimator_gate'
}
+ | {
+ /** @enum {string} */
+ type: 'btree_gist_nan_reindex'
+ }
)[]
}
ProjectUpgradeInitiateResponse: {