About instance settings

MySQL  |  PostgreSQL  |  SQL Server

This page provides information about the settings available for Cloud SQLinstances.

Settings for Cloud SQL for PostgreSQL

SettingModifiable after creation?Possible values
Instance IDN Composed of lowercase letters, numbers, and hyphens; must start with a letter. The total length must be 98 characters or less.
RegionNFor Cloud SQL Enterprise Plus edition:
africa-south1 — Johannesburg
asia-east1 — Taiwan
asia-east2 — Hong Kong
asia-northeast1 — Tokyo
asia-northeast2 — Osaka
asia-northeast3 — Seoul
asia-south1 — Mumbai
asia-south2 — Delhi
asia-southeast1 — Singapore
asia-southeast2 — Jakarta
australia-southeast1 — Sydney
australia-southeast2 — Melbourne
europe-central2 — Warsaw
europe-north1 — Finland
europe-southwest1 — Madrid
europe-west1 — Belgium
europe-west2 — London
europe-west3 — Frankfurt
europe-west4 — Netherlands
europe-west6 — Zürich
europe-west8 — Milan
europe-west9 — Paris
europe-west10 — Berlin
europe-west12 — Turin
me-central1 — Doha
me-central2 — Dammam
me-west1 — Tel Aviv
northamerica-northeast1 — Montréal
northamerica-northeast2 — Toronto
southamerica-east1 — San Paulo
southamerica-west1 — Santiago
us-central1 — Iowa
us-east1 — South Carolina
us-east4 — Northern Virginia
us-east5 — Columbus
us-south1 — Dallas
us-west1 — Oregon
us-west2 — Los Angeles
us-west3 — Salt Lake City
us-west4 — Las Vegas

For Cloud SQL Enterprise edition:
africa-south1 — Johannesburg
asia-east1 — Taiwan
asia-east2 — Hong Kong
asia-northeast1 — Tokyo
asia-northeast2 — Osaka
asia-northeast3 — Seoul
asia-south1 — Mumbai
asia-south2 — Delhi
asia-southeast1 — Singapore
asia-southeast2 — Jakarta
australia-southeast1 — Sydney
australia-southeast2 — Melbourne
europe-central2 — Warsaw
europe-north1 — Finland
europe-north2 — Stockholm
europe-southwest1 — Madrid
europe-west1 — Belgium
europe-west2 — London
europe-west3 — Frankfurt
europe-west4 — Netherlands
europe-west6 — Zürich
europe-west8 — Milan
europe-west9 — Paris
europe-west10 — Berlin
europe-west12 — Turin
me-central1 — Doha
me-central2 — Dammam
me-west1 — Tel Aviv
northamerica-northeast1 — Montréal
northamerica-northeast2 — Toronto
northamerica-south1 - Mexico
southamerica-east1 — São Paulo
southamerica-west1 — Santiago
us-central1 — Iowa
us-east1 — South Carolina
us-east4 — Northern Virginia
us-east5 — Columbus
us-south1 — Dallas
us-west1 — Oregon
us-west2 — Los Angeles
us-west3 — Salt Lake City
us-west4 — Las Vegas
ZoneYThe possible values depend on the region.
Database versionN For Cloud SQL Enterprise Plus edition:
Console string           API enum stringPostgreSQL 17 (default)POSTGRES_17PostgreSQL 16POSTGRES_16PostgreSQL 15POSTGRES_15PostgreSQL 14POSTGRES_14PostgreSQL 13POSTGRES_13PostgreSQL 12POSTGRES_12
For Cloud SQL Enterprise edition:
Console string          API enum stringPostgreSQL 17 (default)POSTGRES_17PostgreSQL 16POSTGRES_16PostgreSQL 15POSTGRES_15PostgreSQL 14POSTGRES_14PostgreSQL 13POSTGRES_13PostgreSQL 12POSTGRES_12PostgreSQL 11POSTGRES_11PostgreSQL 10POSTGRES_10PostgreSQL 9.6POSTGRES_9_6
SSL modeYEnforces/enables SSL as follows:
  • ALLOW_UNENCRYPTED_AND_ENCRYPTED: allows non-SSL/non-TLS and SSL/TLS connections. For SSL connections, the client certificate isn't verified. This is the default value.
  • ENCRYPTED_ONLY: only allows connections encrypted with SSL/TLS.
  • TRUSTED_CLIENT_CERTIFICATE_REQUIRED: only allows connections encrypted with SSL/TLS and with valid client certificates.
When you use these values, you must setrequireSsl to a compatible value or unset to avoid the conflict between values of two settings. For more information, seeIpConfiguration.
Server CA modeN

Lets you configure the server certificate authority (CA) for an instance. You can select one of the following available server CA options:

  • GOOGLE_MANAGED_INTERNAL_CA: this is the default value for instances created with thegcloud CLI, the Cloud SQL Admin API, or Terraform. With this option, an internal CA dedicated to each Cloud SQL instance signs the server certificate for that instance.
  • GOOGLE_MANAGED_CAS_CA: with this option, a CA hierarchy consisting of a root CA and subordinate server CAs managed by Cloud SQL and hosted on Google Cloud Certificate Authority Service (CA Service) is used. The subordinate server CAs in a region sign the server certificates and are shared across instances in the region. For Cloud SQL Auth Proxy connections, to connect to an instance configured with the shared CA option, use the Cloud SQL Auth Proxy version 2.13.0 or later.
  • CUSTOMER_MANAGED_CAS_CA: with this option, you manage the CA hierarchy and the rotation of CA certificates. Before you can create an instance with this option, using CA Service, you create a CA pool in the same region as your instance and at least one CA in that pool. When you create your instance, you specify the CA pool. Your request is delegated to a project-specific service account, which has the permission to use the CA pool. The service account requests a CA from the pool and Cloud SQL uses that CA to sign the server certificate for the instance. For Cloud SQL Auth Proxy connections, to connect to an instance configured with the customer-managed CA option, use the Cloud SQL Auth Proxy version 2.14.3 or later.

For more information, seeCertificate authority (CA) hierarchies.

Set editionY

ENTERPRISE orENTERPRISE PLUS

Note:If the database version for your instance is PostgreSQL 16 and later, then the default Cloud SQL edition is Enterprise Plus.

Set password policyYConfigured or not.
Private IPAfter it's activated, it can't be deactivated.Activated or deactivated.
Public IPYActivated or deactivated.
Authorized networksYIf Public IP is enabled, IP addresses authorized to connect to the instance. You can also specify this value as an IP address range, in CIDR notation.
Private path for Google Cloud servicesYActivated or deactivated.
Data cacheYActivated or deactivated.
Machine typeYMachine type is based on the machine series you select for your Cloud SQL instance. Select from C4A, N2, shared core or dedicated core machine series. Learn more
CoresY For Cloud SQL Enterprise Plus edition:
2 to 128 (predefined machine types only)

For Cloud SQL Enterprise edition:
1 to 96 (must be either 1 or an even number)
Partial for shared vCPU
MemoryY For Cloud SQL Enterprise Plus edition: 6.75 GB to 8 GB per vCPU.
The 6.75 GB to 1 vCPU ratio is for thedb-perf-optimized-N-128 machine type only. All other machine types have the 8 GB to 1 vCPU ratio.
For Cloud SQL Enterprise edition: 0.9 GB to 6.5 GB per vCPU (must be a multiple of 256 MB and at least 3.75 GB).
Storage typeNSSD (default value)
HDD (Cloud SQL Enterprise edition only)
Hyperdisk Balanced(Cloud SQL Enterprise Plus edition only)
Storage capacityY
(Increase only)
Instances with at least one unshared vCPU can have up to 64 TB.
Instances with a shared vCPU can have up to 3054 GB.

Note that creating or increasing storage capacity to 64 TBmight increase latency of common operations, such asbackups, dependent on your workload.
Hyperdisk settingsY This setting is only applicable for Cloud SQL Enterprise Plus edition instances using the C4A machine series.

Provisioned IOPS: 4,000 (default value)
Provisioned throughput: 170 (default value)

For more information about Hyperdisk settings, seeHyperdisk Balanced.
Enable automatic storage increasesYOn (default value)
Off
Data encryption methodNGoogle-owned and Google-managed encryption key (default value)
Cloud KMS key
Automatic storage increase limitY In GBs. 0 (the default) means there is no limit.
BackupsY
On (default value)
Off
Locations optionsYMulti-region (default value)
Region

There is also a drop-down menu with a list of multi-regions when you selectMulti-region or regions when you selectRegion.

Instance deletion protectionYActivated or deactivated.
Retain backups after instance deletionYActivated or deactivated.
Enable point-in-time recovery (PITR)Y
(seenote)
On
Off

The default value varies by instance. For more information, seeUse PITR.

Availability: Single zoneY
On (default value)
Off
High availability (regional)Y
On
Off (default value)
Maintenance: Maintenance windowYAny (default value)
Day of the week and hour of the day
Maintenance: Maintenance timingYAny (default value)
Canary (alsoWeek 1 (wasEarlier) /Preview)
Stable (alsoWeek 2 (wasLater) /Production)
Week 5
Database flagsYSeeConfiguring Database Flags.
Instance ID

The instance ID is the name of the instance. It is used to uniquely identify your instance within the project. Choose an instance name that is aligned with the purpose of the instance when possible.

The total length ofproject-ID:instance-ID must be 98 characters or less.

You do not need to include the project ID in the instance name. This is done automatically whereappropriate (for example, in the log files).Important: You should be aware that some resource identifiers (such as project IDs) might be retained beyond the life of your project. For this reason, avoid storing sensitive information in resource identifiers....see naming guidelines
Region
The Google Cloud region where your instance is located. You can only set the region during instance creation. To improve performance, keep your data close to the services that need it. For more information, seeInstance Locations.
Zone
The Google Cloud zone where your instance is located. If you are connecting from a Compute Engine instance, select the zone where the Compute Engine instance is located. Otherwise, accept the default zone. You can edit the instance later to change the zone, if needed. For more information, seeInstance Locations.
Machine Type

Determines memory and virtual cores available for your Cloud SQLinstance. Machine types are part of a machine series, and machine seriesavailability is determined by your Cloud SQL edition.

For Cloud SQL Enterprise Plus edition instances, Cloud SQLoffers predefined machine types for your instances intheN2 andC4Amachine series.

For Cloud SQL Enterprise edition instances, Cloud SQL offerspredefined and custom machine types.

If you require real-time processing, such as online transactionprocessing (OLTP), make sure that your instance has enough memory to containthe entire working set. However, there are other factors that can impactmemory requirements, such as number of active connections, and internaloverhead processes. Perform load testing to avoid performanceissues in your production environment.

When you configure your instance, select sufficient memory and vCPUs to handleyour needs, and scale up your instance as your requirements increase. A machine configurationwith insufficient vCPUs might lose its SLA coverage. For more information,seeOperational guidelines.

To learn more about the machine types and machine series availablefor your Cloud SQL instance, seeMachine series overview.

Note:Thedb-f1-micro anddb-g1-small machine types aren't included in theCloud SQL SLA. These machine types are configured to use a shared-core CPU, and are designed to provide low-cost test and development instances only. Don't use them for production instances.

Your machine type affects the cost of your instance. For more information, seeInstance Pricing. You can also see pricing for various scenarios with thePricing Calculator.

Set password policy

The password policy for the instance. It includes the following options:

  • Minimum length: Specifies the minimum number of characters that the password must have.
  • Password complexity: Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
  • Restrict password reuse: Specifies the number of previous passwords that you cannot reuse.
  • Disallow username: Prevents the use of the username in the password.
  • Set password change interval: Specifies the minimum duration after which you can change the password.

Cores

The number of CPUs for your instance. You can also choose to create an instance with less than one CPU (a shared code instance, or shared vCPU).

Memory

The amount of memory available for your instance. For performance-sensitive workloads such as online transaction processing (OLTP), make sure that your instance has enough memory to contain the entire working set. However, there are other factors that can impact memory requirements, such as number of active connections. Perform load testing to avoid performance issues in production.

Database version
Unless you need a capability provided only by a specific version, accept the default database version (PostgreSQL 16). Forgcloud command and REST API usage, see the reference documentation.
Storage type

Storage type is determined by the machine type you selectfor your instance. Each machine type belongs to a specific machine series, andeach machine series offers different storage type options.

Storage type by machine series:

  • C4A machine series: Hyperdisk Balanced
  • N2 machine series: SSD or HDD

For the N2 machine series, choosingSSD, the default value, provides your instance with SSD storage. SSDs provide lower latency and higher data throughput. If you don't need high-performance access to your data, for example for long-term storage or rarely accessed data, you can reduce your costs by choosingHDD.

For the C4A machine series, choosingHyperdisk Balanced, the default and only value, provides a scalable, high-performance storage service. To learn more about Hyperdisk Balanced and its limitations, seeStorage options overview.

SSL mode

(Optional) The SSL/TLS options for a database connection. Cloud SQL uses SSL/TLS to establish secure, authenticated, and encrypted connections to instances. You can use the SSL mode settingsslModeto enforce all database connections to an instance to use SSL/TLS encryption. You can also use this setting to enforce verification of client certificates. This setting gives you more granular controls over your SSL connections compared torequireSsl. We recommend that you usesslMode. For more information, seeIpConfiguration. You can enforce SSL when you create an instance or update it for any existing instance.

Server CA mode

(Optional) When you create an instance, you can select the server CA mode for the instance.

  • GOOGLE_MANAGED_INTERNAL_CA: this is the default value. Cloud SQL creates a new self-signed server CA for each instance.
  • GOOGLE_MANAGED_CAS_CA: the instance uses a server CA hierarchy hosted by Certificate Authority Service and the issuing CAs are shared across all instances in the same region.
  • CUSTOMER_MANAGED_CAS_CA: the instance uses a server CA that you create from a CA pool. With this option, you manage the CA hierarchy and the rotation of CA certificates.

For more information about these options, seeCertificate authority (CA) hierarchies.

Storage capacity

Choose a capacity to fit your database size. After you have created your instance, you can manually increase the storage capacity byediting your instance configuration, but you cannot decrease it. Increasing the storage capacity does not cause downtime.

The amount of storage capacity allocated for your instance affects the cost of your instance. For more information, seeStorage and Networking Pricing.

For read replicas, the storage capacity must always be at least as high as the storage capacity of the primary instance. When a primary instance is resized, all read replicas are resized, if needed, so that they have at least as much storage capacity as the updated primary instance.

Note:Setting your storage capacity too small without enablingautomatic storage increases can cause your instance to lose its SLA.Learn more

Cloud SQL may override theenable automatic storage increases andautomatic storage increase limit settings to perform critical database maintenance.
Enable automatic storage increases

If you enable this setting, Cloud SQL checks your available storage every 30 seconds. If the available storage falls below a threshold size, Cloud SQL automatically adds additional storage capacity. If the available storage repeatedly falls below the threshold size, Cloud SQL continues to add storage until it reaches the maximum of 64 TB.

Note: You can increase storage size, but you cannot decrease it; the storage increases are permanent for the life of the instance. When you enable this setting, a spike in storage requirements can permanently increase storage costs (incrementally) for your instance. If an instance runs out of available space, it can cause the instance to go offline, and the Cloud SQL SLA might not cover the outage.

The automatic storage increase setting of a primary instance automatically applies to any read replicas of that instance. The automatic storage increase setting cannot be independently set for read replicas.

Note: When an instance is nearly out of storage capacity, it's automatically stopped to prevent the loss of information. Enabling this setting might prevent such an operation.

Threshold

The threshold size depends on the amount of storage currently provisioned for your instance; it cannot be larger than 25 GB.

For instances provisioned with 500 GB of storage (or more), the threshold is always 25 GB.

For instances provisioned with less than 500 GB of storage, this formula is used to calculate the threshold:

  5 + (provisioned storage)/25

The result of the division is rounded down to the nearest whole number.

Threshold calculation for an instance with 66 GB storage capacity:

5 + (1/25th of 66 GB) = 5 + (66/25) = 5 + 2.6 -> 5 + 2 = 7 GB
Threshold calculation for an instance with 1000 GB storage capacity:
5 + (1/25th of 1000 GB) = 5 + (1000/25) = 5 + 40 = 45 -> rounded down to themaximum value of 25 GB

Amount of storage added

The amount of storage added to the instance is equal to the threshold size,which cannot be larger than 25 GB.

Considerations for large disks

For instances provisioned with storage of 500 GB or more, the threshold size is always 25 GB and the amount of storage added is always 25 GB. As a result, the maximum possible empty space is 50 GB. If you do not manually resize the instance with disk greater than 5 TB, the disk can remain at 99% capacity all the time even though the instance has empty space.

Before an operation that rapidly grows disk space usage, such as a large import or a query that requires a large temp table, manually resize the disk, rather than depend on automatic storage increase to keep up.

The file system uses some space internally for file system metadata. This space isn't included in the disk usage metric (database/disk/bytes_used). For large disks, the reserved space can take 1% to 3% of total disk size, so you might see the automatic storage increase occur before the disk usage reaches the threshold.

Data encryption method

By default, your Cloud SQL instance is encrypted with a Google-owned and managed key. If you want to control this key, then use a customer-managed encryption key (CMEK) in Cloud Key Management Service (KMS). Cloud KMS integrates with Cloud SQL.

Using Cloud KMS keys gives you control over their protection level, location, rotation schedule, usage and access permissions. In addition, you can use various encryption keys across resources. Using Cloud KMS also lets you track key usage, view audit logs, and control key life cycles.

Instead of Google owning and managing the keys that protect your data, you control and manage these keys in Cloud KMS.

For more information about CMEKs, seeAbout customer-managed encryption keys (CMEKs).

Automatic storage increase limit

If you enable the automatic storage increase setting, you can provide a specific limit on how large the storage for your instance can automatically grow. Keep in mind that the bigger the size of the instance, the greater the operational latency.

You can't decrease storage size, so this limit can prevent your instance size from growing too large (due to a temporary increase in traffic). Keep in mind that when an instance becomes unable to add storage that it needs, the instance likely stops accepting incoming connections and could go offline.

Setting this limit to zero, the default value, means that there is no limit (other than the maximum available storage for the instance tier).

To set the limit when you create the instance, use the--storage-auto-increase-limit=INTEGER_VALUE_OF_GB parameter, as described on thecreate instance page. To set the limit on an existing instance, use the same parameter with thegcloud beta sql instances patch command.

The automatic storage increase limit setting of a primary instance automatically applies to any read replicas of that instance. The automatic storage increase limit setting cannot be independently set for read replicas.

Automated backups and point-in-time recovery

These options determine if automated backups are performed and if write-ahead logging is enabled. Both options add a small performance cost and use additional storage, but are required for the creation of replicas and clones, and for point-in-time recovery. When you select this option, you can also select a timeframe when automated backups occur.

Automated backups happen daily, during the time window you choose. At the end of seven days, the oldest backup is deleted.

For information about point-in-time recovery, see Overview of point-in-time recovery.

For information about replication, see Replication Options. For information about cloning instances, seeCloning Instances.

Note: Enabling or disabling point-in-time recovery causes the instance to be restarted. Existing database connections are closed and must be reopened.
Retention settings for automated backups

The default value for the number of retained backups is 7 but you can change it to any value in the range of 1 to 365.

See Automated backup and transaction log retention for more information.

Location options

You can choose to store backups in multiple or single regions.Multi-region is the default, and the recommended choice because it provides protection against downtime when a region becomes unavailable. Backups are stored in regions that are closest to the instance.

You also have the option of selecting a custom location for your backup. Only use this option if required by regulation or if an organization policy requires your backups to be in specific multiple or single regions. SeeCustom locations for more information.

Instance deletion protection

Protects an instance against accidental deletion. If this setting is enabled, you must deactivate it before deleting the instance. See Prevent deletion of an instance.

Retain backups after instance deletion

Retains on-demand and automated backups for an instance after the instance is deleted. For more information about this setting, see Retained backups.

Enable point-in-time recovery

Point-in-time recovery lets you recover from a backup, starting from a specific point in time.

For information about point-in-time recovery, seeOverview of point-in-time recovery.

Availability: Zonal

Puts your instance and backups in a single zone. When you select this option, there is no failover in the event of an outage. Recommended only for test and development purposes.

High availability (regional)

When you selectHigh availability (regional), if there is an outage, your instance fails over to another zone in the region where your instance is located, as long as the failover zone is not having an outage. It is recommended that you selectHigh availability (regional) for instances in your production environment.

See theOverview of the high availability configuration.

Maintenance window

The day and hour that your maintenance events for the Cloud SQL instance are scheduled. For Cloud SQL Enterprise Plus edition primary instances, the maintenance downtime is typically less than 1 second. For all other instances, maintenance downtime is typically 60 seconds or less on average.

Read replicas do not support maintenance window settings at this time.

For more information about maintenance, seeAbout maintenance on Cloud SQL instances.

Maintenance timing

Your preference about the relative timing of maintenance updates. You can receive your updates one or two weeks after the notification and test your maintenance updates in a test environment before your production instances get the update. You can also choose to receive the maintenance update five weeks ("week5") after the notification is sent out. The maintenance timing setting doesn't affect the maintenance version that Cloud SQL applies to your instance.

If you don't set the maintenance timing setting, Cloud SQL chooses the timing of updates to your instance (within its maintenance window, if applicable).

For more information about maintenance, seeAbout maintenance on Cloud SQL instances.

Private IP
Configures your instance to use private IP.Learn more.
Public IP
If enabled, your instance is allocated a public IPv4 address. When you deactivate Public IP, that address is released; you can reenable Public IP later, but you receive a different IPv4 address. By default, the public IP address is blocked for all addresses. UseAuthorized networks to enable access.
Authorized networks
You can add specific IP addresses or ranges of addresses to open your instance to those addresses.

For information about configuring IP addresses, seeConfiguring IP connectivity.

Private path for Google Cloud services

By selecting this check box, you allow other Google Cloud services, such as BigQuery, to access data in Cloud SQL and make queries against this data over a private connection.

This check box is enabled only if you select thePrivate IP check box, and you add or select anauthorized network to create a private connection.

Data cache

Data cache is optional for Cloud SQL for PostgreSQL Enterprise Plus edition instances. Data cache utilizes local SSDs to extend the OS page cache from memory to the SSD tier. Cloud SQL manages this setting. Caching your entire working set provides maximum performance when using data cache. You can use the Google Cloud console,gcloud CLI, or Cloud SQL Admin API to turn this setting on or off for your Cloud SQL for PostgreSQL Enterprise Plus edition instances.

Activation policy
You change the activation policy bystarting and stopping the instance. Stopping the instance prevents further instance charges.
Database flags

You can set specific database flags on the Cloud SQL instance.

For a complete list of the database flags you can set, seeConfigure Database Flags.

Impact of changing instance settings

For most instance settings, Cloud SQL applies the change immediately andconnectivity to the instance is unaffected.

If you're using Cloud SQL Enterprise edition, then changing the number of CPUs or the memorysize results in the instance going offline for less than 60 seconds.The total time for the changes to take effectcan take several minutes. Changing an instance's zone, configuring theprivate IP, changing its network, and enabling high availability results in the instance going offline for severalminutes.

If you're using Cloud SQL Enterprise Plus edition, then you can make some instance settingchanges, such as scaling up vCPUs or enabling or disabling data cache, withnear-zero downtime.For more information, seeAvailability in Cloud SQL.

Cloud SQL automatically manages the value of themax_connections flag based on the amount of memory on the instance(for more information, seesupportedflags). PostgreSQL requiresthat the value ofmax_connections is always at least as large on aread replica as it is on its primary. Therefore, if the read replicas have lessmemory than the primary, changing the amount of memory on the primary mightresult in its read replicas going offline for less than 60 seconds. This happensbecause the read replicas might need to receive a new value ofmax_connectionsto remain consistent with the change on the primary, and updating the value ofmax_connections requires restarting PostgreSQL. To prevent thisfrom happening, set themax_connections flag on the primary to avalue of your choice.

Plan to make these kinds of changes when your service can handle an outage ofthis duration.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-18 UTC.