diff --git a/managed/ui/src/redesign/features/universe/universe-form/form/fields/PGCompatibilityField/PGCompatibilityField.tsx b/managed/ui/src/redesign/features/universe/universe-form/form/fields/PGCompatibilityField/PGCompatibilityField.tsx
index 8b55e9a4b53a..158fc86224ed 100644
--- a/managed/ui/src/redesign/features/universe/universe-form/form/fields/PGCompatibilityField/PGCompatibilityField.tsx
+++ b/managed/ui/src/redesign/features/universe/universe-form/form/fields/PGCompatibilityField/PGCompatibilityField.tsx
@@ -1,9 +1,10 @@
-import { FC } from 'react';
+import { FC, useState } from 'react';
import { useUpdateEffect } from 'react-use';
import { useTranslation, Trans } from 'react-i18next';
import { Box, makeStyles, Typography, Link } from '@material-ui/core';
import { useFormContext, useWatch } from 'react-hook-form';
import { YBToggleField, YBLabel, YBTooltip } from '../../../../../../components';
+import { AnalyzeDialog } from '../../../../universe-actions/edit-pg-compatibility/AnalyzeDialog';
import { isVersionPGSupported } from '../../../utils/helpers';
import { UniverseFormData } from '../../../utils/dto';
import { PG_COMPATIBILITY_FIELD, SOFTWARE_VERSION_FIELD } from '../../../utils/constants';
@@ -41,11 +42,13 @@ const useStyles = makeStyles((theme) => ({
export const PGCompatibiltyField: FC
= ({ disabled }) => {
const { control, setValue } = useFormContext();
+ const [openAnalyzeModal, setAnalyzeModal] = useState(false);
const classes = useStyles();
const { t } = useTranslation();
//watchers
const dbVersionValue = useWatch({ name: SOFTWARE_VERSION_FIELD });
+ const pgValue = useWatch({ name: PG_COMPATIBILITY_FIELD });
const isPGSupported = isVersionPGSupported(dbVersionValue);
@@ -54,6 +57,10 @@ export const PGCompatibiltyField: FC = ({ disabled })
if (!isVersionPGSupported(dbVersionValue)) setValue(PG_COMPATIBILITY_FIELD, false);
}, [dbVersionValue]);
+ useUpdateEffect(() => {
+ if (pgValue) setAnalyzeModal(true);
+ }, [pgValue]);
+
return (
= ({ disabled })
+ setAnalyzeModal(false)} />
);
};
diff --git a/managed/ui/src/redesign/features/universe/universe-form/form/sections/advanced/AdvancedConfiguration.tsx b/managed/ui/src/redesign/features/universe/universe-form/form/sections/advanced/AdvancedConfiguration.tsx
index 4b09d1a21b58..5fae4d92efde 100644
--- a/managed/ui/src/redesign/features/universe/universe-form/form/sections/advanced/AdvancedConfiguration.tsx
+++ b/managed/ui/src/redesign/features/universe/universe-form/form/sections/advanced/AdvancedConfiguration.tsx
@@ -65,7 +65,7 @@ export const AdvancedConfiguration = ({ runtimeConfigs }: UniverseFormConfigurat
{provider.code !== CloudType.kubernetes && (
-
+
)}
{provider.code === CloudType.aws && (
diff --git a/managed/ui/src/translations/en.json b/managed/ui/src/translations/en.json
index 657cd41b8742..e766f8f844d4 100644
--- a/managed/ui/src/translations/en.json
+++ b/managed/ui/src/translations/en.json
@@ -41,6 +41,7 @@
"and": "and",
"learnMore": "Learn more",
"clear": "Clear",
+ "reminder": "Reminder",
"duration": {
"seconds": "Seconds",
"minutes": "Minutes",
@@ -250,7 +251,13 @@
"disableWarning2": "Requires a rolling restart of {{universeName}}. The universe will remain online and available throughout.",
"disableWarning3": "May impact performance.",
"disableWarning1RF1": "Note! Disabling enhanced Postgres compatibility requires a restart of {{universeName}} and may impact performance.",
- "disableWarning2RF1": "The universe won't be available for reads and writes during the restart."
+ "disableWarning2RF1": "The universe won't be available for reads and writes during the restart.",
+ "analyzeModal": {
+ "msg1": "Enabling Enhanced Postgres Compatibility also enables the Cost Based Optimizer (CBO).",
+ "msg2": "You must run",
+ "msg3": "on user tables after data load for the CBO to create optimal execution plans.",
+ "learnLink": "Learn more about ANALYZE"
+ }
},
"connectionPooling": {
"modalTitle": "Edit Connection Pooling",
@@ -326,7 +333,7 @@
"yqlServerRpcPort": "YCQL RPC Port",
"ysqlServerHttpPort": "YSQL HTTP Port",
"ysqlServerRpcPort": "YSQL RPC Port",
- "internalYsqlServerRpcPort": "YSQL Database Port",
+ "internalYsqlServerRpcPort": "Internal YSQL Port",
"enhancePGCompatibility": "Enhanced Postgres Compatibility",
"earlyAccess": "Early Access",
"pgSubText": "Configure YSQL for maximum Postgres compatibility by enabling
early access features. <1>Learn more1>",
@@ -2704,16 +2711,16 @@
"deleteMsg": "scheduled backup policy is being deleted",
"editModal": {
"title": "Edit Scheduled Backup Policy",
- "backupStrategy":"Backup Strategy",
+ "backupStrategy": "Backup Strategy",
"success": "Scheduled backup policy is being updated"
},
"deleteModal": {
- "deleteMsg":"Are you sure you want to delete this schedule policy?"
+ "deleteMsg": "Are you sure you want to delete this schedule policy?"
},
"showIntervalModal": {
"title": "Backup Intervals",
- "fullBackup":"Full Backup",
- "incrementalBackup":"Incremental Backup"
+ "fullBackup": "Full Backup",
+ "incrementalBackup": "Incremental Backup"
},
"backupTables": "Backup Tables"
}
@@ -2769,11 +2776,11 @@
"parallelThreads": "Parallel threads (Optional)"
},
"validationErrMsg": {
- "keyspacesAlreadyExists":"Keyspace already exists in the target Universe",
+ "keyspacesAlreadyExists": "Keyspace already exists in the target Universe",
"pitrMillisOptions.secs": "Secs must be between 0 to 59",
"kmsConfigRequired": "KMS Config is required",
- "invalidKeyspaceName":"Invalid keyspace name",
- "duplicateKeyspaceName":"Duplicate keyspace name given"
+ "invalidKeyspaceName": "Invalid keyspace name",
+ "duplicateKeyspaceName": "Duplicate keyspace name given"
}
}
},