- AlloyDB is PostgreSQL-compatible (versions 14 to 18, 17 is the default) but runs a Google-built engine on disaggregated compute and regional storage.
- A cluster has one primary instance (basic or highly available) and optional read pools of up to 20 nodes that all share one storage layer.
- The columnar engine keeps selected columns in memory in columnar form to speed up scans, joins and aggregates on live transactional data.
- AlloyDB charges per vCPU and GiB of memory at higher rates than Cloud SQL, but bills storage on use rather than on provisioned capacity; it is not serverless.
What is AlloyDB for PostgreSQL?
AlloyDB (Google Cloud AlloyDB, sometimes written Alloy DB) is a fully managed, PostgreSQL-compatible database service. Google pairs its own database engine with a cloud-based, multi-node architecture and aims it at demanding workloads: hybrid transactional and analytical processing (HTAP), generative AI applications that need vector search close to the data, and mission-critical systems that need high availability.
Applications connect with the standard PostgreSQL protocol, so psql, pgAdmin and ordinary PostgreSQL drivers work, and each cluster is pinned to a PostgreSQL major version you choose (14 to 18 at the time of writing, with 17 as the default). Google keeps minor versions current through maintenance, and maintenance is designed to cause less than a second of downtime on primary instances while read pools stay available.
AlloyDB sits between Cloud SQL, which runs community PostgreSQL on a single primary VM, and Spanner, which scales writes horizontally across regions. Its main advantage over Cloud SQL is read scaling and analytics on a shared storage layer, while staying close enough to PostgreSQL that applications rarely need rewriting.
AlloyDB architecture: clusters, instances and nodes
Standard PostgreSQL couples the query engine and storage on one server. AlloyDB separates them. Compute runs on nodes (VMs); storage is a distributed engine that keeps data across several zones of the region and grows automatically. Resources are organised in three levels:
- Cluster: the regional container for your databases, logs and metadata.
- Primary instance: exactly one per cluster, for reads and writes. A highly available primary has an active and a standby node in different zones with automatic failover; a basic primary has a single node for non-production use.
- Read pool instances: read-only endpoints with up to 20 nodes in total across the cluster, load-balanced automatically.
Because every instance reads the same storage, adding read nodes does not copy the data or raise storage cost. AlloyDB also runs adaptive autovacuum, automatic memory management and an index advisor. For disaster recovery you can create secondary clusters in other regions, which AlloyDB updates asynchronously, and continuous backup lets you restore to any point within the retention window.
The AlloyDB columnar engine
The columnar engine keeps a copy of selected table columns in memory in a column-oriented format, together with a planner and executor that use it. It helps queries that scan many rows but few columns: selective filters, SUM, MIN, MAX, AVG and COUNT aggregates, some hash joins and JSON filters. You can enable it on the primary, on a read pool or both, and auto-columnarization can choose the columns for you based on the workload.
The documented limits are worth knowing before you rely on it. Enabling the engine requires a restart, and by default it uses 30% of the instance's memory. Every column a query fragment touches must be in the column store, frequent row updates invalidate columnar data until it is refreshed, partitioned tables must be loaded partition by partition, and for small tables (typically under 5,000 rows) or indexed columns the planner may prefer the row store.
AlloyDB AI and vector search
AlloyDB AI is a set of extensions for building AI features inside the database:
vector, a version of pgvector customised for AlloyDB, for storing and indexing embeddings;alloydb_scann, an approximate nearest-neighbour index based on Google's ScaNN algorithm;google_ml_integration, for generating embeddings and calling registered models (including external models from OpenAI or Anthropic) from SQL;alloydb_ai_nl, which turns natural-language questions into SQL.
Cloud SQL for PostgreSQL also supports pgvector, so vector search alone is not a reason to move; ScaNN indexes and in-database model calls are the AlloyDB-specific parts.
AlloyDB Omni: AlloyDB outside Google Cloud
AlloyDB Omni is a downloadable, self-managed edition that shares core components with the managed service but runs on storage you choose: your data centre, another public cloud, cloud VMs or a laptop. Google distributes it as a container (for Docker, Podman or Kubernetes with an operator) and as RPM packages for RHEL 9 and Rocky Linux 9. It includes the columnar engine and AlloyDB AI. Production use is licensed by vCPU through subscriptions managed in the Google Cloud console.
Google states that, in its performance tests, AlloyDB Omni runs transactional workloads more than twice as fast and analytical queries up to 100 times faster than standard PostgreSQL. These are vendor figures we have not reproduced. Omni suits teams with data-residency rules, disconnected sites or a wish to avoid committing to a managed cloud service.
AlloyDB pricing vs Cloud SQL
AlloyDB has no licence fees or I/O charges; you pay for vCPUs and memory per node, storage, backups and network egress. Compared with Cloud SQL, three differences shape the bill:
- Compute rates are higher per vCPU and per GiB than both Cloud SQL editions, and an HA primary bills two nodes.
- Storage is billed on use and shared by all instances, whereas Cloud SQL bills provisioned disk per instance and each read replica has its own copy.
- Transaction logs for the first seven days of continuous backup are retained at no extra charge.
For a single small database, AlloyDB usually costs more than Cloud SQL. The gap narrows as you add read capacity, because read pool nodes share storage. The worked examples below compare an AlloyDB HA primary with an equivalent Cloud SQL Enterprise Plus HA instance. See also Google Cloud SQL vs AlloyDB.
When to use AlloyDB, and when not to
AlloyDB fits PostgreSQL applications that need many read replicas, reporting on live data without a separate warehouse, in-database AI features, or a 99.99% SLA for an HA primary. It also suits teams who want the same engine on Google Cloud and on-premises through Omni.
Look elsewhere for small or development databases where cost dominates (Cloud SQL's shared-core and Enterprise machines are cheaper), for engines other than PostgreSQL, for workloads that need horizontal write scaling across regions (Spanner), or for a pay-per-request serverless database (Firestore). Heavy warehouse-style analytics over very large data sets still belong in BigQuery; see BigQuery vs PostgreSQL.
Pricing
Prices from the provider's official pricing pages, checked 8 October 2026, region Iowa (us-central1), in USD, excluding tax. List prices only; discounts, commitments and your actual usage change the bill.
AlloyDB list prices for the N2 and C4A machine series: 0.06608 USD per vCPU-hour and 0.0112 USD per GiB-hour of memory on demand (0.04956 and 0.0084 with a one-year commitment, 0.0317184 and 0.005376 with three years). Regional cluster storage is 0.0004109 USD per GiB-hour and standard backup storage 0.000137 USD per GiB-hour. Data transfer into AlloyDB and within the same region is free. Google's free features page offers a 30-day AlloyDB free trial cluster with an 8 vCPU basic instance and up to 1 TB of storage.
Development cluster: 1 vCPU basic instance
- C4A 1 vCPU, 8 GiB basic (single-node) primary; Google recommends this shape for development only
- 20 GiB of data stored, 730 hours, no read pool
- Excludes backups beyond the free seven days of logs, egress and tax
| Item | Basis | Estimated per month |
|---|---|---|
| vCPU | 1 vCPU x 730 hours x 0.06608 USD | 48.24 USD |
| Memory | 8 GiB x 730 hours x 0.0112 USD | 65.41 USD |
| Storage | 20 GiB x 730 hours x 0.0004109 USD | 6.00 USD |
| Estimated total | About 119.65 USD per month |
Production: HA primary, 4 vCPU and 32 GiB per node
- Highly available primary (two nodes: active and standby), assumed 4 vCPU and 32 GiB per node
- 200 GiB of data stored and 200 GiB of standard backup storage, 730 hours, on-demand rates
- Excludes read pools, egress and tax
| Item | Basis | Estimated per month |
|---|---|---|
| vCPUs (2 nodes) | 2 x 4 vCPUs x 730 hours x 0.06608 USD | 385.91 USD |
| Memory (2 nodes) | 2 x 32 GiB x 730 hours x 0.0112 USD | 523.26 USD |
| Storage | 200 GiB x 730 hours x 0.0004109 USD | 59.99 USD |
| Backup storage | 200 GiB x 730 hours x 0.000137 USD | 20.00 USD |
| Estimated total | About 989.16 USD per month |
For comparison: Cloud SQL Enterprise Plus HA of the same size
- Cloud SQL Enterprise Plus, N2, 4 vCPU and 32 GiB, high availability
- 200 GiB provisioned SSD and 200 GiB of backups, 730 hours, on-demand Cloud SQL rates for Iowa
- Excludes data cache storage, egress and tax
| Item | Basis | Estimated per month |
|---|---|---|
| HA vCPUs | 4 vCPUs x 730 hours x 0.1074 USD | 313.61 USD |
| HA memory | 32 GiB x 730 hours x 0.0182 USD | 425.15 USD |
| HA SSD storage | 200 GiB x 730 hours x 0.000465753 USD | 68.00 USD |
| Backups | 200 GiB x 730 hours x 0.000109589 USD | 16.00 USD |
| Estimated total | About 822.76 USD per month |
Worked examples are estimates calculated from the list prices above; they are not quotes or measured bills.
Frequently asked questions
Is AlloyDB fully compatible with PostgreSQL?
Google describes AlloyDB as fully PostgreSQL-compatible: it uses the PostgreSQL protocol, standard clients such as psql and pgAdmin, and a chosen PostgreSQL major version. The engine underneath is built by Google, and only supported extensions can be installed, so check the extension list before migrating.
Is there an AlloyDB serverless option?
Not in the pay-per-request sense. You choose a machine type for each instance and pay per vCPU and GiB of memory per hour, while storage scales automatically and is billed on use. For low-cost development, use a basic instance or the 1 vCPU shape.
What is the difference between AlloyDB and Cloud SQL for PostgreSQL?
Cloud SQL runs community PostgreSQL on one primary VM with its own disk, from shared-core machines upwards. AlloyDB runs a Google-built engine on separate compute and shared regional storage, adds read pools, a columnar engine and AlloyDB AI, and costs more per vCPU. See Cloud SQL for PostgreSQL.
What SLA does AlloyDB offer?
The AlloyDB SLA sets a 99.99% monthly uptime objective for AlloyDB with high availability enabled in most regions (99.95% in the Mexico and Stockholm regions). Free trial clusters and the 1 vCPU shape have no uptime SLA.
Can I try AlloyDB for free?
Yes. A free trial cluster runs for up to 30 days with an 8 vCPU basic primary instance and storage that scales up to 1 TB. You still pay for data transfer outside the region and for a final backup, and the cluster is deleted after a 15-day grace period unless you upgrade.
Sources
- AlloyDB overview
- AlloyDB: About the columnar engine
- AlloyDB AI
- AlloyDB Omni overview
- AlloyDB: Database version policies
- AlloyDB: Create a cluster and its primary instance
- AlloyDB free trial clusters
- AlloyDB pricing
- AlloyDB SLA
- Cloud SQL pricing
- Google Cloud Free Trial and Free Tier
Checked 8 October 2026.
How we research cloud database guides: our editorial method. CodeWithSQL earns nothing from the providers mentioned.