Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

CloudSQL PITR: Is Archival of WAL logs on cloudstorage charged

On turning on the point-in-time recovery for cloudsql postgres instance, the WAL logs gets stored into cloudstorage bucket in same region as of instance (bucket is not publicly accessible hence could not be monitored ). 
The doc says that This log storage generates no additional cost per instance. But does it add any extra cost for cloudstorage usage by WAL logs ? 

0 2 824
2 REPLIES 2

There are some nuances to consider regarding costs and Cloud SQL PITR with WAL logs stored in GCS:

  1. PITR Storage Costs: Enabling Point-In-Time Recovery (PITR) in Cloud SQL does not incur additional per-instance costs specifically for the storage of Write-Ahead Logging (WAL) logs. The storage of these logs is typically included in the overall cost of the Cloud SQL service. 

  2. Egress Charges: If you transfer data out of the GCS bucket (such as accessing logs from a different region), you might incur network egress charges. This is a standard aspect of GCS pricing.

  3. Automatic Deletion and Compression: Cloud SQL automatically deletes WAL logs older than the retention period you set (up to 30 days), which helps manage storage costs. Additionally, WAL logs are compressed before storage, reducing the storage footprint and associated costs.

  4. Storage Tiers: While using different storage tiers like Standard, Nearline, Coldline, or Archive can be cost-effective for general GCS usage, the management of WAL logs, including their storage tier, is typically handled by the Cloud SQL service. Users generally do not have direct control over the storage tier used for these logs.

  5. Monitoring and Managing Costs: You can track storage usage and manage costs using Cloud Monitoring tools. The Cloud Monitoring API and Console provide ways to monitor, create dashboards, and set up alerts. Specifically, the Cloud SQL metric "bytes_used_by_data_type" can be useful for monitoring the storage used by archived WAL logs.

  6. Additional Resources: For the most accurate and up-to-date information, refer to the following resources:

While the storage of WAL logs for PITR in Cloud SQL is generally included in the Cloud SQL service cost, it's crucial to stay informed about the latest pricing models and to use available monitoring tools to manage and optimize costs effectively.

Can you confirm this is indeed a regional bucket and not a multi-region bucket?  If so, is there any way to get multi-region storage of WAL logs? Thanks!