Auto-activate for alloydb-omni in compose/k8s configs. AlloyDB Omni expertise: run AlloyDB anywhere (local, on-prem, other clouds) with container-based deployment. Produces container-based AlloyDB Omni deployments for local dev and non-GCP environments. Use when: running AlloyDB locally for development, deploying Omni containers, configuring Kubernetes operators, or testing AlloyDB features without GCP. Not for GCP-managed AlloyDB (see alloydb) or vanilla PostgreSQL.
From flownpx claudepluginhub cofin/flow --plugin flowThis skill uses the workspace's default tool permissions.
references/config.mdreferences/kubernetes-operator.mdreferences/performance.mdreferences/setup.mdSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides agentic engineering workflows: eval-first loops, 15-min task decomposition, model routing (Haiku/Sonnet/Opus), AI code reviews, and cost tracking.
AlloyDB Omni is the downloadable edition of AlloyDB that runs anywhere: local machines, on-premises data centers, or other cloud providers. It is distributed as a container image and includes the same query processing and columnar engine as the managed AlloyDB service.
| Method | Image | Use Case |
|---|---|---|
| Docker | google/alloydbomni:latest | Local development, CI |
| Podman | google/alloydbomni:latest | Rootless containers, RHEL |
| Kubernetes | AlloyDB Omni Operator | Production on-prem/multi-cloud |
| RPM | alloydbomni package | Bare metal / VM (RHEL/CentOS) |
| Variable | Purpose | Example |
|---|---|---|
POSTGRES_PASSWORD | Initial superuser password (required) | mysecretpassword |
POSTGRES_DB | Database to create on first start | myapp |
POSTGRES_USER | Superuser name (default: postgres) | postgres |
docker compose up -dpsql -h localhost -U postgresdocker compose down (data persists in named volume)Use Docker/Podman for local development and CI. Use the Kubernetes operator for production non-GCP deployments. Use RPM for bare-metal servers.
Set --memory, --cpus, and --shm-size based on workload. For development, 2 CPUs / 4GB RAM / 256MB shared memory is a reasonable starting point.
Always use a named volume for /var/lib/postgresql/data. Without a volume, data is lost when the container stops. Optionally mount ./init-scripts to /docker-entrypoint-initdb.d for first-run SQL.
For non-trivial workloads, configure shared_buffers (25% of container memory), effective_cache_size (75%), and work_mem via ALTER SYSTEM SET or a mounted config file.
Connect via localhost:5432. AlloyDB Omni supports all AlloyDB features including the columnar engine, so you can test analytical queries locally.
--memory and --cpus, the container can consume all host resources and destabilize the machineshm_size to at least 256MB — the default 64MB is too small for PostgreSQL and causes "could not resize shared memory segment" errorsPOSTGRES_PASSWORD in production — use secrets management (Docker secrets, Kubernetes secrets, or Vault)pg_dump or volume snapshots; there is no managed backup like GCP AlloyDBgoogle/alloydbomni:latest can change between runs; use a specific version tag for reproducibilityBefore delivering configurations, verify:
shm_size is set to at least 256MBPOSTGRES_PASSWORD is set (container will not start without it)Docker Compose for local AlloyDB Omni development:
# docker-compose.yml
services:
alloydb:
image: google/alloydbomni:latest
container_name: alloydb-omni
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-devsecret}
POSTGRES_DB: myapp
POSTGRES_USER: postgres
ports:
- "5432:5432"
volumes:
- alloydb-data:/var/lib/postgresql/data
- ./init-scripts:/docker-entrypoint-initdb.d
restart: unless-stopped
shm_size: "256m"
deploy:
resources:
limits:
cpus: "2"
memory: 4G
volumes:
alloydb-data:
Initialization script to enable the columnar engine:
-- init-scripts/01-extensions.sql
CREATE EXTENSION IF NOT EXISTS vector;
CREATE EXTENSION IF NOT EXISTS google_ml_integration;
</example>
The AlloyDB Omni Kubernetes Operator manages DBCluster custom resources (CRD: dbclusters.alloydbomni.dbadmin.goog/v1). Key lifecycle operations:
availabilityOptions.standby: Enabled in primarySpec; the operator promotes the standby automatically on primary failurekubectl patch dbcluster <name> --type=merge -p '{"spec":{"readPoolSpec":{"replicas":<N>}}}'primarySpec.parameters triggers a controlled rolling restart with no data lossalloydbomni.dbadmin.goog/backup=true to trigger an immediate backupdatabaseVersion or the image tag; the operator orchestrates a rolling restartSee references/kubernetes-operator.md for the full CRD spec, HA configuration YAML, scaling examples, health monitoring, and upgrade procedures.
Key diagnostics for AlloyDB Omni production workloads:
EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT) to identify sequential scans, high-cost nodes, and buffer hit ratiospg_class JOIN pg_index where indisvalid = false to find indexes that need rebuilding with REINDEX CONCURRENTLYpg_stat_user_tables for n_dead_tup and n_live_tup ratios; tables with dead-tuple ratio above 20% are candidates for VACUUM ANALYZEpg_stat_activity filtered on state = 'active' and wait_event_type to identify lock waits and long-running queriesSee references/performance.md for ready-to-run diagnostic queries, autovacuum tuning, and connection lifecycle management.
The columnar engine accelerates analytical queries by caching selected columns in a compressed in-memory format.
google_columnar_engine.memory_limit (e.g., ALTER SYSTEM SET google_columnar_engine.memory_limit = '4GB') — allocate 10–25% of total container/node memorySELECT google_columnar_engine_add('<table>') or individual column-level populationEXPLAIN output before and after adding a table — look for Custom Scan (columnar scan) nodes replacing Seq ScanSELECT * FROM g_columnar_memory_usage shows per-relation memory consumption and hit ratesThe AlloyDB Omni Gemini CLI extension provides 24 tools for managing clusters, running diagnostics, and executing administrative operations from the command line:
gemini extensions install https://github.com/gemini-cli-extensions/alloydb-omni
Use this extension to complement operator-based workflows with interactive diagnostics, query analysis, and cluster introspection without writing raw psql or kubectl commands.
For detailed guides and code examples, refer to the following documents in references/: