alloydb-postgres-optimize
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUsage
使用方法
All scripts can be executed using Node.js. Replace and with actual values.
<param_name><param_value>Bash:
node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'PowerShell:
node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence.
所有脚本均可通过Node.js执行。将和替换为实际值。
<param_name><param_value>Bash:
node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'PowerShell:
node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'注意:脚本会自动从各种.env文件加载环境变量。除非因缺少环境变量导致技能执行失败,否则不要要求用户设置变量。
Scripts
脚本
database_overview
database_overview
Fetches the current state of the PostgreSQL server, returning the version, whether it's a replica, uptime duration, maximum connection limit, number of current connections, number of active connections, and the percentage of connections in use.
获取PostgreSQL服务器的当前状态,返回版本信息、是否为副本服务器、运行时长、最大连接限制、当前连接数、活跃连接数以及连接使用率百分比。
get_cluster
get_cluster
Retrieves details about a specific AlloyDB cluster.
检索特定AlloyDB集群的详细信息。
Parameters
参数
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| project | string | The GCP project ID. This is pre-configured; do not ask for it unless the user explicitly provides a different one. | No | |
| location | string | The location of the cluster (e.g., 'us-central1'). | Yes | |
| cluster | string | The ID of the cluster. | Yes |
| 名称 | 类型 | 描述 | 必填 | 默认值 |
|---|---|---|---|---|
| project | string | GCP项目ID。此参数已预先配置;除非用户明确提供不同的ID,否则无需询问。 | 否 | |
| location | string | 集群所在位置(例如:'us-central1')。 | 是 | |
| cluster | string | 集群ID。 | 是 |
list_available_extensions
list_available_extensions
Discover all PostgreSQL extensions available for installation on this server, returning name, default_version, and description.
发现此服务器上可安装的所有PostgreSQL扩展,返回名称、默认版本和描述信息。
list_installed_extensions
list_installed_extensions
List all installed PostgreSQL extensions with their name, version, schema, owner, and description.
列出所有已安装的PostgreSQL扩展,包括它们的名称、版本、模式、所有者和描述信息。
list_memory_configurations
list_memory_configurations
List PostgreSQL memory-related configurations (name and current setting) from pg_settings.
从pg_settings中列出PostgreSQL与内存相关的配置(名称和当前设置)。
list_pg_settings
list_pg_settings
Parameters
参数
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| setting_name | string | Optional: A specific configuration parameter name pattern to search for. | No | `` |
| limit | integer | Optional: The maximum number of rows to return. | No | |
| 名称 | 类型 | 描述 | 必填 | 默认值 |
|---|---|---|---|---|
| setting_name | string | 可选:要搜索的特定配置参数名称模式。 | 否 | `` |
| limit | integer | 可选:返回的最大行数。 | 否 | |