Google Cloud SQL for PostgreSQL is Google's fully managed Postgres — enable pgvector, postgis, and pg_cron from SQL, with a two-step flag-then-CREATE-EXTENSION model for extensions that need a preloaded shared library.
vector data type and ivfflat and hnsw access methods
Job scheduler for PostgreSQL
Cheminformatics functionality for PostgreSQL.
Extension to manage partitioned tables by time or ID
Extension to manage partitioned tables by time or ID
Reorganize tables in PostgreSQL databases with minimal locks
Reorganize tables in PostgreSQL databases with minimal locks
PL/JavaScript (v8) trusted procedural language
provides auditing functionality
incremental view maintenance on PostgreSQL
PostgreSQL Logical Replication
type for storing hyperloglog data
Give PostgreSQL ability to manually force some decisions in execution plans.
Give PostgreSQL ability to manually force some decisions in execution plans.
extended check for plpgsql functions
A tool to remove unused space from a relation.
foreign data wrapper for Oracle access
Functions and operators that emulate a subset of functions and packages from the Oracle RDBMS
Functions and operators that emulate a subset of functions and packages from the Oracle RDBMS
Foreign data wrapper for querying a TDS database (Sybase or Microsoft SQL Server)
Foreign data wrapper for querying a TDS database (Sybase or Microsoft SQL Server)
An extension collecting statistics about quals
Logical decoding plugin that delivers WAL stream changes using a Protocol Buffer format
Logical decoding plugin that delivers WAL stream changes using a Protocol Buffer format
Run SQL queries in the background
Database partitioning implemented as procedural language
Database partitioning implemented as procedural language
sampling based statistics of wait events
IPv4/v6 and IPv4/v6 range index type for PostgreSQL
create 2-gram (bigram) index for faster full text search.
create 2-gram (bigram) index for faster full text search.
examine and manage the os buffer cache
Extension to add Global Temporary Tables feature to PostgreSQL
Extension to add Global Temporary Tables feature to PostgreSQL
Exposes the Linux operating-system process table through SQL so load, memory, CPU, and I/O stats can be queried from PostgreSQL.
Exposes the Linux operating-system process table through SQL so load, memory, CPU, and I/O stats can be queried from PostgreSQL.
Provides a means for logging execution plans of slow statements automatically
Provides a means for logging execution plans of slow statements automatically
bloom access method - signature file based index
support for indexing common datatypes in GIN
support for indexing common datatypes in GiST
data type for case-insensitive character strings
connect to other PostgreSQL databases from within a database
connect to other PostgreSQL databases from within a database
text search dictionary template for integers
calculate great-circle distances on the surface of the Earth
determine similarities and distance between strings
data type for storing sets of (key, value) pairs
functions for tracking who changed a table
functions, operators, and index support for 1-D arrays of integers
data types for international product numbering standards
data type for hierarchical tree-like structures
functions for tracking last modification time
inspect the contents of database pages at a low level
examine the free space map (FSM)
track planning and execution statistics of all SQL statements executed
track planning and execution statistics of all SQL statements executed
text similarity measurement and index searching based on trigrams
text similarity measurement and index searching based on trigrams
examine the visibility map (VM) and page-level visibility info
examine the visibility map (VM) and page-level visibility info
PL/pgSQL procedural language
PostGIS geometry and geography spatial types and functions
foreign-data wrapper for remote PostgreSQL servers
functions for implementing referential integrity (obsolete)
functions that manipulate whole tables, including crosstab
functions that manipulate whole tables, including crosstab
TABLESAMPLE method which accepts number of rows as a limit
TABLESAMPLE method which accepts time in milliseconds as a limit
TABLESAMPLE method which accepts time in milliseconds as a limit
text search dictionary that removes accents
generate universally unique identifiers (UUIDs)
Extensions on Cloud SQL come in two flavors. Most just need a single CREATE EXTENSION, run as the cloudsqlsuperuser (the default `postgres` user). A handful — pg_cron, pgaudit, pg_hint_plan, pg_squeeze, pglogical, auto_explain, postgresql_anonymizer, pg_bigm, and pg_wait_sampling — preload a shared library, so you must first set a `cloudsql.enable_<name>` database flag (which restarts the instance) and then run CREATE EXTENSION.
Plain extensions need only CREATE EXTENSION, run as the cloudsqlsuperuser (default `postgres` user).
-- Plain extension (no flag required) — e.g. pgvector
CREATE EXTENSION IF NOT EXISTS vector;
-- Verify it's installed
SELECT extname, extversion FROM pg_extension WHERE extname = 'vector';Flag-gated extensions need the cloudsql.enable_<name> flag set first (this restarts the instance), then CREATE EXTENSION. NOTE: --database-flags REPLACES the entire flag set, so comma-join every flag you want to keep.
# 1. Set the preload flag (restarts the instance).
# --database-flags REPLACES all flags — list every flag you want to keep.
gcloud sql instances patch INSTANCE_NAME \
--database-flags=cloudsql.enable_pg_cron=on
# 2. After the restart, create the extension:
# CREATE EXTENSION pg_cron;Terraform manages flags as settings.database_flags blocks on google_sql_database_instance. Add one block per flag, then run CREATE EXTENSION once the instance has restarted.
resource "google_sql_database_instance" "postgres" {
name = "INSTANCE_NAME"
database_version = "POSTGRES_18"
settings {
tier = "db-custom-2-7680"
database_flags {
name = "cloudsql.enable_pg_cron"
value = "on"
}
}
}
# Then, against the instance: CREATE EXTENSION pg_cron;These extensions ship enabled by default — no CREATE EXTENSION needed.
Proprietary extensions that exist only on Google Cloud SQL for PostgreSQL, not part of the open-source PostgreSQL ecosystem.
Google's proprietary extension for in-database machine learning — generate embeddings and call Vertex AI model endpoints directly from SQL, with model endpoint management built in.
DocsA Cloud SQL database flag that enables vector-query assistance for pgvector workloads, improving the planning and execution of similarity search.
DocsExtensions you might expect that aren't available on Google Cloud SQL for PostgreSQL, with workarounds where they exist.
timescaledbWhy missing: Cloud SQL for PostgreSQL does not include timescaledb in its managed extension allow-list, and you can't install it yourself. Google's AlloyDB for PostgreSQL doesn't offer it either.
Alternative: For time-series workloads, use native Postgres partitioning with pg_partman (which Cloud SQL does support), run TimescaleDB self-managed on a Compute Engine VM, or use a provider that ships it such as Timescale Cloud or Crunchy Bridge.
citusWhy missing: Cloud SQL does not support citus — distributed/sharded Postgres isn't part of the Cloud SQL extension allow-list, and it can't be added manually.
Alternative: For scale-out beyond a single primary, use AlloyDB for PostgreSQL (Google's analytics-optimized managed Postgres), run Citus self-managed, or choose a managed Citus offering.
Cloud SQL runs a managed allow-list: you can install only the extensions that Cloud SQL supports, and you cannot create your own extensions in Cloud SQL. Extensions are creatable only by the cloudsqlsuperuser (the default `postgres` user) via CREATE EXTENSION, and there is no trusted-language or bring-your-own mechanism for native C extensions. To get a new extension added, file a request on the Cloud SQL public issue tracker.
1bench is a modern GUI client for PostgreSQL — connect to your Google Cloud SQL for PostgreSQL instance, install extensions, write queries, and inspect schemas without leaving the IDE.
Try 1bench for PostgreSQL