@postgres.ai/shared 4.0.0-pr-1031 → 4.0.0-pr-695.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/index.js +1 -1
- package/package.json +1 -1
- package/pages/Clone/index.js +2 -2
- package/pages/Instance/Clones/ClonesList/ConnectionModal/index.js +3 -3
- package/pages/Instance/Configuration/configOptions.js +6 -6
- package/pages/Instance/Configuration/index.js +1 -1
- package/pages/Instance/Configuration/tooltipText.js +14 -14
package/config/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { enUS } from 'date-fns/locale';
|
|
|
2
2
|
import { getUserLocale } from 'get-user-locale';
|
|
3
3
|
export const config = {
|
|
4
4
|
dateFnsLocale: enUS,
|
|
5
|
-
appName: 'Postgres.
|
|
5
|
+
appName: 'Postgres.ai',
|
|
6
6
|
};
|
|
7
7
|
const loadDateFnsLocale = async () => {
|
|
8
8
|
const userLocale = getUserLocale();
|
package/package.json
CHANGED
package/pages/Clone/index.js
CHANGED
|
@@ -241,12 +241,12 @@ export const Clone = observer((props) => {
|
|
|
241
241
|
style: styles.inputFieldLabel,
|
|
242
242
|
}, FormHelperTextProps: {
|
|
243
243
|
style: styles.inputFieldHelper,
|
|
244
|
-
} }), _jsx(IconButton, { className: classes.copyButton, "aria-label": "Copy", onClick: () => copyToClipboard(psqlConnectionStr), children: icons.copyIcon })] }), "\u00A0", _jsx(Tooltip, { content: _jsx(_Fragment, { children: "Used to connect to
|
|
244
|
+
} }), _jsx(IconButton, { className: classes.copyButton, "aria-label": "Copy", onClick: () => copyToClipboard(psqlConnectionStr), children: icons.copyIcon })] }), "\u00A0", _jsx(Tooltip, { content: _jsx(_Fragment, { children: "Used to connect to Postgres using psql. Change DBNAME to\u00A0 name of the database you want to connect. Use PGPASSWORD\u00A0 environment variable to set database password or type\u00A0 it when prompted." }), children: _jsx("span", { className: classes.textFieldInfo, children: icons.infoIcon }) })] })), jdbcConnectionStr && (_jsxs("div", { className: classes.fieldBlock, children: [_jsxs("div", { className: classes.copyFieldContainer, children: [_jsx(TextField, { variant: "outlined", label: "JDBC connection string", value: jdbcConnectionStr, className: classes.textField, margin: "normal", fullWidth: true,
|
|
245
245
|
// @ts-ignore
|
|
246
246
|
readOnly: true, InputLabelProps: {
|
|
247
247
|
shrink: true,
|
|
248
248
|
style: styles.inputFieldLabel,
|
|
249
249
|
}, FormHelperTextProps: {
|
|
250
250
|
style: styles.inputFieldHelper,
|
|
251
|
-
} }), _jsx(IconButton, { className: classes.copyButton, "aria-label": "Copy", onClick: () => copyToClipboard(jdbcConnectionStr), children: icons.copyIcon })] }), "\u00A0", _jsx(Tooltip, { content: _jsx(_Fragment, { children: "Used to connect to
|
|
251
|
+
} }), _jsx(IconButton, { className: classes.copyButton, "aria-label": "Copy", onClick: () => copyToClipboard(jdbcConnectionStr), children: icons.copyIcon })] }), "\u00A0", _jsx(Tooltip, { content: _jsx(_Fragment, { children: "Used to connect to Postgres using JDBC. Change DBNAME to\u00A0 name of the database you want to connect, change DBPASSWORD\u00A0 to the password you\u2019ve used on clone creation." }), children: _jsx("span", { className: classes.textFieldInfo, children: icons.infoIcon }) })] }))] })), _jsx("br", {}), _jsx("div", { className: classes.fieldBlock, children: _jsxs("span", { className: classes.remark, children: ["Password was set during clone creation. It\u2019s not being stored.", _jsx("br", {}), "You would need to recreate a clone if the password is lost."] }) }), _jsx("br", {}), _jsx("p", { children: _jsx("strong", { children: "Protection" }) }), _jsxs("p", { children: [_jsx(FormControlLabel, { className: classes.checkboxLabel, control: _jsx(Checkbox, { checked: clone.protected, onChange: toggleDataProtection, name: "protected", disabled: isDisabledControls }), label: "Enable deletion protection" }), _jsx("br", {}), _jsxs("span", { className: classes.remark, children: ["When enabled, no one can delete this clone and automated deletion is also disabled.", _jsx("br", {}), "Please be careful: abandoned clones with this checkbox enabled may cause out-of-disk-space events. Check disk space on daily basis and delete this clone once the work is done."] })] }), stores.main.updateCloneError && (_jsx(ErrorStub, { title: "Updating error", message: stores.main.updateCloneError, className: classes.errorStub }))] }), _jsxs("div", { className: classes.snippetContainer, children: [_jsx(SectionTitle, { tag: "h2", level: 2, text: 'Reset clone using CLI' }), _jsx("p", { className: classes.tooltip, children: "You can reset the clone using CLI using the following command:" }), _jsx(SyntaxHighlight, { content: getCliResetCloneCommand(props.cloneId) }), _jsx(SectionTitle, { className: classes.title, tag: "h2", level: 2, text: 'Delete clone using CLI' }), _jsx("p", { className: classes.tooltip, children: "You can delete the clone using CLI using the following command:" }), _jsx(SyntaxHighlight, { content: getCliDestroyCloneCommand(props.cloneId) }), _jsx(SectionTitle, { className: classes.title, tag: "h2", level: 2, text: 'Toggle deletion protection using CLI' }), _jsx("p", { className: classes.tooltip, children: "You can toggle deletion protection using CLI for this clone using the following command:" }), _jsx(SyntaxHighlight, { content: getCliProtectedCloneCommand(true) }), _jsx(SyntaxHighlight, { content: getCliProtectedCloneCommand(false) }), _jsx(SectionTitle, { className: classes.title, tag: "h2", level: 2, text: 'Create snapshot for this clone using CLI' }), _jsx("p", { className: classes.tooltip, children: "You can create a snapshot for this clone using CLI using the following command:" }), _jsx(SyntaxHighlight, { content: getCreateSnapshotCommand(props.cloneId) })] }), _jsxs(_Fragment, { children: [_jsx(DestroyCloneRestrictionModal, { isOpen: isOpenRestrictionModal, onClose: () => setIsOpenRestrictionModal(false), cloneId: clone.id }), _jsx(DestroyCloneModal, { isOpen: isOpenDestroyModal, onClose: () => setIsOpenDestroyModal(false), cloneId: clone.id, onDestroyClone: destroyClone }), _jsx(ResetCloneModal, { isOpen: isOpenResetModal, onClose: () => setIsOpenResetModal(false), clone: clone, snapshots: snapshots.data, onResetClone: resetClone, version: (_g = instance.state) === null || _g === void 0 ? void 0 : _g.engine.version })] })] })] }));
|
|
252
252
|
});
|
|
@@ -66,9 +66,9 @@ export const ConnectionModal = observer((props) => {
|
|
|
66
66
|
const jdbcConnectionStr = getJdbcConnectionStr(clone);
|
|
67
67
|
return (_jsx(Modal, { title: "Clone connection info", isOpen: isOpen, onClose: onClose, children: _jsxs("div", { className: classes.root, children: [sshPortForwardingCommand && (_jsxs("div", { className: classes.item, children: [_jsxs("p", { className: classes.fieldText, children: ["In a separate console, set up SSH port forwarding", _jsx("br", {}), "(and keep it running):"] }), _jsx(TextField, { label: "SSH port forwarding", value: sshPortForwardingCommand, className: classes.field, InputProps: {
|
|
68
68
|
endAdornment: (_jsx(IconButton, { className: classes.copyButton, onClick: () => copy(sshPortForwardingCommand), children: icons.copyIcon })),
|
|
69
|
-
} })] })), psqlConnectionStr && (_jsxs("div", { className: classes.item, children: [_jsx("p", { className: classes.fieldText, children: "Connect to
|
|
69
|
+
} })] })), psqlConnectionStr && (_jsxs("div", { className: classes.item, children: [_jsx("p", { className: classes.fieldText, children: "Connect to Postgres using psql:" }), _jsxs("div", { className: classes.fieldWrapper, children: [_jsx(TextField, { label: "psql connection string", value: psqlConnectionStr, className: classes.field, InputProps: {
|
|
70
70
|
endAdornment: (_jsx(IconButton, { className: classes.copyButton, onClick: () => copy(psqlConnectionStr), children: icons.copyIcon })),
|
|
71
|
-
} }), _jsx(Tooltip, { content: _jsx(_Fragment, { children: "Used to connect to
|
|
71
|
+
} }), _jsx(Tooltip, { content: _jsx(_Fragment, { children: "Used to connect to Postgres using psql. Change DBNAME to\u00A0 name of the database you want to connect. Use PGPASSWORD\u00A0 environment variable to set database password or type\u00A0 it when prompted." }), children: _jsx("span", { className: classes.fieldInfo, children: icons.infoIcon }) })] })] })), jdbcConnectionStr && (_jsxs("div", { className: classes.item, children: [_jsx("p", { className: classes.fieldText, children: "Connect to Postgres using JDBC:" }), _jsxs("div", { className: classes.fieldWrapper, children: [_jsx(TextField, { label: "JDBC connection string", value: jdbcConnectionStr, className: classes.field, InputProps: {
|
|
72
72
|
endAdornment: (_jsx(IconButton, { className: classes.copyButton, onClick: () => copy(jdbcConnectionStr), children: icons.copyIcon })),
|
|
73
|
-
} }), _jsx(Tooltip, { content: _jsx(_Fragment, { children: "Used to connect to
|
|
73
|
+
} }), _jsx(Tooltip, { content: _jsx(_Fragment, { children: "Used to connect to Postgres using JDBC. Change DBNAME to\u00A0 name of the database you want to connect, change DBPASSWORD\u00A0 to the password you\u2019ve used on clone creation." }), children: _jsx("span", { className: classes.fieldInfo, children: icons.infoIcon }) })] })] })), _jsxs("p", { className: classes.note, children: ["Password was set during clone creation. It\u2019s not being stored.", _jsx("br", {}), "You would need to recreate a clone if the password is lost."] })] }) }));
|
|
74
74
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export const dockerImageOptions = [
|
|
2
2
|
{
|
|
3
|
-
name: 'Generic
|
|
3
|
+
name: 'Generic Postgres (postgresai/extended-postgres)',
|
|
4
4
|
type: 'Generic Postgres',
|
|
5
5
|
},
|
|
6
|
-
{ name: 'Generic
|
|
7
|
-
{ name: 'Amazon RDS for
|
|
8
|
-
{ name: 'Amazon RDS Aurora for
|
|
9
|
-
{ name: 'Heroku
|
|
10
|
-
{ name: 'Supabase
|
|
6
|
+
{ name: 'Generic Postgres with PostGIS', type: 'postgis' },
|
|
7
|
+
{ name: 'Amazon RDS for Postgres', type: 'rds' },
|
|
8
|
+
{ name: 'Amazon RDS Aurora for Postgres', type: 'aurora' },
|
|
9
|
+
{ name: 'Heroku Postgres', type: 'heroku' },
|
|
10
|
+
{ name: 'Supabase Postgres', type: 'supabase' },
|
|
11
11
|
{ name: 'Google Cloud SQL for PostgreSQL', type: 'google-cloud-sql' },
|
|
12
12
|
{
|
|
13
13
|
name: 'Timescale Cloud',
|
|
@@ -520,7 +520,7 @@ export const Configuration = observer(({ instanceId, switchActiveTab, reload, is
|
|
|
520
520
|
value: image,
|
|
521
521
|
children: image,
|
|
522
522
|
};
|
|
523
|
-
}) })] })), _jsxs(Typography, { paragraph: true, children: ["Cannot find your image? Reach out to support:", ' ', _jsxs("a", { href: 'https://postgres.ai/contact', target: "_blank", className: styles.externalLink, children: ["https://postgres.ai/contact", _jsx(ExternalIcon, { className: styles.externalIcon })] })] })] })] }), _jsxs(Box, { mb: 3, children: [_jsx(ConfigSectionTitle, { tag: "databaseConfigs" }), _jsx("span", { className: classes.grayText, style: { marginTop: '0.5rem', display: 'block' }, children: "Default
|
|
523
|
+
}) })] })), _jsxs(Typography, { paragraph: true, children: ["Cannot find your image? Reach out to support:", ' ', _jsxs("a", { href: 'https://postgres.ai/contact', target: "_blank", className: styles.externalLink, children: ["https://postgres.ai/contact", _jsx(ExternalIcon, { className: styles.externalIcon })] })] })] })] }), _jsxs(Box, { mb: 3, children: [_jsx(ConfigSectionTitle, { tag: "databaseConfigs" }), _jsx("span", { className: classes.grayText, style: { marginTop: '0.5rem', display: 'block' }, children: "Default Postgres configuration used for all Postgres instances running in containers managed by DBLab." }), _jsx(InputWithTooltip, { type: "textarea", label: "shared_buffers parameter", value: formik.values.sharedBuffers, tooltipText: tooltipText.sharedBuffers, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('sharedBuffers', e.target.value) }), _jsx(InputWithTooltip, { type: "textarea", label: "shared_preload_libraries", value: formik.values.sharedPreloadLibraries, tooltipText: tooltipText.sharedPreloadLibraries, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('sharedPreloadLibraries', e.target.value) }), _jsx(InputWithTooltip, { type: "textarea", label: "Query tuning parameters", value: typeof formik.values.tuningParams === 'object'
|
|
524
524
|
? Object.entries(formik.values.tuningParams)
|
|
525
525
|
.map(([key, value]) => `${key}=${value}`)
|
|
526
526
|
.join('\n')
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styles from './styles.module.scss';
|
|
3
3
|
export const tooltipText = {
|
|
4
|
-
dockerTag: () => (_jsx("div", { children: "Docker image version
|
|
5
|
-
dockerImage: () => (_jsxs("div", { children: ["Major PostgreSQL version (e.g., \"9.6\", \"15\"). For logical provisioning mode, the version used by DBLab
|
|
6
|
-
dockerImageType: () => (_jsxs("div", { children: ["Docker image used to run all database containers \
|
|
7
|
-
sharedBuffers: () => (_jsxs("div", { children: ["Defines
|
|
8
|
-
sharedPreloadLibraries: () => (_jsxs("div", { children: ["Specifies one or more shared libraries (comma-separated list) to be preloaded at
|
|
9
|
-
host: () => (_jsx("div", { children: "Hostname
|
|
10
|
-
port: () => (_jsx("div", { children: "Port of
|
|
11
|
-
username: () => (_jsx("div", { children: "Username used to connect to
|
|
12
|
-
password: () => (_jsx("div", { children: "Password used to connect to
|
|
13
|
-
dbname: () => (_jsxs("div", { children: ["Database name used to connect to the source to run
|
|
14
|
-
databases: () => (_jsx("div", { children: "Specifies
|
|
15
|
-
dumpParallelJobs: () => (_jsx("div", { children: "Number of parallel workers used to dump the source databases to disk. If the source is
|
|
4
|
+
dockerTag: () => (_jsx("div", { children: "Docker image version - latest ones listed first. If unsure, pick the top one" })),
|
|
5
|
+
dockerImage: () => (_jsxs("div", { children: ["Major PostgreSQL version (e.g., \"9.6\", \"15\"). For logical provisioning mode, the version used by DBLab doesn't need to match the version used on the source (although, it's recommended). ", _jsx("br", {}), "If you need a version that is not listed here, contact support."] })),
|
|
6
|
+
dockerImageType: () => (_jsxs("div", { children: ["Docker image used to run all database containers \u2013 clones, snapshot preparation containers, sync containers. Although such images are based on traditional Docker images for Postgres, DBLab expects slightly different behavior: e.g., Postgres is not the first process used to start container, so Postgres restarts are possible, they do not trigger container state change. For details, see", ' ', _jsx("a", { target: '_blank', href: 'https://postgres.ai/docs/database-lab/supported-databases', className: styles.externalLink, children: "the docs" }), "."] })),
|
|
7
|
+
sharedBuffers: () => (_jsxs("div", { children: ["Defines default buffer pool size of each Postgres instance managed by DBLab. Note, that this amount of RAM is immediately allocated at Postgres startup time. For example, if the machine running DBLab has 32 GiB of RAM, and the value used here is '1GB', then the theoretical limit of the number of clones is 32. Practically, this limit is even lower because some memory is consumed by various other processes. If you need more clones, reduce the value of", ' ', _jsx("span", { className: styles.firaCodeFont, children: "configs.shared_buffers" }), "."] })),
|
|
8
|
+
sharedPreloadLibraries: () => (_jsxs("div", { children: ["Specifies one or more shared libraries (comma-separated list) to be preloaded at Postgres server start (", _jsx("a", { target: '_blank', href: 'https://postgresqlco.nf/doc/en/param/shared_preload_libraries/', className: styles.externalLink, children: "details" }), "). If some libraries/extensions are missing, Postgres fails to start, so make sure that ", _jsx("span", { className: styles.firaCodeFont, children: "dockerImage" }), ' ', "used above contains all the needed extensions."] })),
|
|
9
|
+
host: () => (_jsx("div", { children: "Hostname/IP of database that will be used as source for data retrieval (full data refresh)." })),
|
|
10
|
+
port: () => (_jsx("div", { children: "Port of database that will be used as source for data retrieval (full data refresh)." })),
|
|
11
|
+
username: () => (_jsx("div", { children: "Username used to connect to database that will be used as source for data retrieval (full data refresh)." })),
|
|
12
|
+
password: () => (_jsx("div", { children: "Password used to connect to database that will be used as source for data retrieval (full data refresh)." })),
|
|
13
|
+
dbname: () => (_jsxs("div", { children: ["Database name used to connect to the source to run diagnostics queries. This database is not necesserarily to be copied (another field,", ' ', _jsx("span", { className: styles.firaCodeFont, children: "databases" }), ", defines which database to copy)."] })),
|
|
14
|
+
databases: () => (_jsx("div", { children: "Specifies list of databases Postgres server to copy at data retrieval (full data refresh). To specify multiple database names, provide each value in a separte line or use space as a divider. To copy all available databases, leave this value empty." })),
|
|
15
|
+
dumpParallelJobs: () => (_jsx("div", { children: "Number of parallel workers used to dump the source databases to disk. If the source is production server under load, it is not recommended to use more than 50% of its number of vCPUs. The higher number, the faster dumping is, but the higher risks of performance issues on the source (e.g., due to CPU or disk IO saturation)." })),
|
|
16
16
|
pgDumpCustomOptions: () => (_jsx("div", { children: "pg_dump options to be used to create a database dump, for example: '--exclude-schema=repack --exclude-schema=\"camelStyleSchemaName\"'. Note that due to security reasons, the current implementation supports only letters, numbers, hyphen, underscore, equal sign, and double quotes." })),
|
|
17
|
-
restoreParallelJobs: () => (_jsx("div", { children: "Number of parallel workers used to restore databases from dump to
|
|
17
|
+
restoreParallelJobs: () => (_jsx("div", { children: "Number of parallel workers used to restore databases from dump to Postgres managed by DBLab. For initial data retrieval (very first data refresh), it is recommended to use the number of vCPUs available on machine running DBLab. With this approach, we have faster restore time, but we need to keep in mind that we can also have higher usage of CPU and disk IO on this machine (up to temporary saturation of resources). For subsequent refreshes, if DBLab is constantly used, it is recommended to reduce this value by 50% to keep some room for normal use of DBLab (such as work with clones)." })),
|
|
18
18
|
pgRestoreCustomOptions: () => (_jsx("div", { children: "pg_restore options to be used to restore from a database dump, for example: '--exclude-schema=repack --exclude-schema=\"camelStyleSchemaName\"'. Note that due to security reasons, the current implementation supports only letters, numbers, hyphen, underscore, equal sign, and double quotes." })),
|
|
19
19
|
timetable: () => (_jsxs("div", { children: ["Schedule for full data refreshes, in", ' ', _jsx("a", { target: '_blank', href: 'https://en.wikipedia.org/wiki/Cron#Overview', className: styles.externalLink, children: "crontab format" }), "."] })),
|
|
20
|
-
tuningParams: () => (_jsxs("div", { children: ["Query tuning parameters.
|
|
20
|
+
tuningParams: () => (_jsxs("div", { children: ["Query tuning parameters. This is essential to ensure that cloned PostgreSQL most likely generates the same plans as on the source (specifically, it is crutial for query performance troubleshooting and optimization, including working with EXPLAIN plans). For details, see the", ' ', _jsx("a", { target: '_blank', href: 'https://postgres.ai/docs/how-to-guides/administration/postgresql-configuration#postgresql-configuration-in-clones', className: styles.externalLink, children: "docs" }), "."] })),
|
|
21
21
|
};
|