Get WarehousePG status
get_warehousepg_statusCheck if the database is a WarehousePG or Greenplum MPP cluster, returning availability, coordinator role, primary segment count, and mirroring status. Returns diagnostic for non-WarehousePG servers.
Instructions
Probe the connected server for the WarehousePG (Greenplum-derived MPP) signature. Reports available=true only when BOTH the version string mentions WarehousePG / Greenplum AND the gp_segment_configuration catalog view exists. Surfaces coordinator_role, segment_count (primary segments only), and mirroring (bool). On vanilla PostgreSQL clusters returns available=false with a clean diagnostic — the rest of the mcpg.warehousepg.* family advertise themselves inert via this probe. Read-only; never raises.
Example: get_warehousepg_status()
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | Yes | ||
| version | Yes | ||
| available | Yes | ||
| mirroring | Yes | ||
| segment_count | Yes | ||
| coordinator_role | Yes |