alloydb-postgres-optimize

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Usage

使用方法

All scripts can be executed using Node.js. Replace
<param_name>
and
<param_value>
with actual values.
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

参数

NameTypeDescriptionRequiredDefault
projectstringThe GCP project ID. This is pre-configured; do not ask for it unless the user explicitly provides a different one.No
locationstringThe location of the cluster (e.g., 'us-central1').Yes
clusterstringThe ID of the cluster.Yes

名称类型描述必填默认值
projectstringGCP项目ID。此参数已预先配置;除非用户明确提供不同的ID,否则无需询问。
locationstring集群所在位置(例如:'us-central1')。
clusterstring集群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

参数

NameTypeDescriptionRequiredDefault
setting_namestringOptional: A specific configuration parameter name pattern to search for.No``
limitintegerOptional: The maximum number of rows to return.No
50

名称类型描述必填默认值
setting_namestring可选:要搜索的特定配置参数名称模式。``
limitinteger可选:返回的最大行数。
50