Dokumentasi Cloud SQL untuk PostgreSQL
Cloud SQL untuk PostgreSQL adalah layanan database terkelola sepenuhnya yang
membantu Anda menyiapkan, memelihara, mengelola, dan mengatur
database relasional PostgreSQL di Google Cloud Platform.
Pelajari lebih lanjut
Mulai bukti konsep Anda dengan kredit gratis senilai $300
-
Mendapatkan akses ke Gemini 2.0 Flash Thinking
-
Penggunaan bulanan gratis untuk produk populer, termasuk AI API dan BigQuery
-
Tidak ada biaya otomatis, tanpa komitmen
Terus jelajahi dengan lebih dari 20 produk yang selalu gratis
Akses 20+ produk gratis untuk kasus penggunaan umum, termasuk API AI, VM, data warehouse, dan lainnya.
Pelatihan
Pelatihan dan tutorial
Menggunakan Cloud SQL untuk PostgreSQL dengan Ruby on Rails 5
Pelajari cara menghubungkan aplikasi Ruby on Rails 5 ke Cloud SQL untuk PostgreSQL.
Pelatihan
Pelatihan dan tutorial
Menghubungkan ke Cloud SQL dengan Cloud Functions
Pelajari cara terhubung ke Cloud SQL dari Cloud Functions.
Kasus penggunaan
Kasus penggunaan
Men-deploy Pega menggunakan Compute Engine dan Cloud SQL
Pelajari cara men-deploy Pega Platform, yang merupakan platform pengelolaan proses bisnis dan pengelolaan hubungan pelanggan (CRM) dengan Cloud SQL untuk PostgreSQL.
CRM
Arsitektur referensi
Kasus penggunaan
Kasus penggunaan
Checklist peluncuran produksi
Checklist ini menyediakan aktivitas yang direkomendasikan untuk diselesaikan guna meluncurkan aplikasi komersial yang menggunakan Cloud SQL. Checklist ini berfokus pada aktivitas khusus Cloud SQL.
Produksi
Peluncuran
Kasus penggunaan
Kasus penggunaan
Ringkasan residensi data
Pelajari cara menggunakan Cloud SQL untuk menerapkan persyaratan residensi data untuk data.
Residensi data
data
Kasus penggunaan
Kasus penggunaan
Menggunakan Secret Manager untuk menangani secret di Cloud SQL
Pelajari cara menggunakan Secret Manager untuk menyimpan informasi sensitif tentang instance Cloud SQL
dan pengguna sebagai secret.
Secret Manager
secret
Contoh kode
Contoh Kode
Python SQLAlchemy
Menggunakan SQLAlchemy dengan database Cloud SQL untuk PostgreSQL Anda
Contoh kode
Contoh Kode
Contoh Node.js
Menghubungkan ke database Cloud SQL untuk PostgreSQL di Node.js
Contoh kode
Contoh Kode
PHP PDO
Menghubungkan database Cloud SQL untuk PostgreSQL menggunakan PDO PHP
Contoh kode
Contoh Kode
Contoh aplikasi web Go
Contoh sederhana menghubungkan ke Cloud SQL untuk PostgreSQL menggunakan Go
Contoh kode
Contoh Kode
Contoh .NET
Aplikasi contoh ini menunjukkan cara menyimpan data di Google Cloud SQL dengan database PostgreSQL saat dijalankan di Lingkungan Fleksibel Google App Engine.
Contoh kode
Contoh Kode
Gunakan Terraform untuk membuat instance Cloud SQL untuk PostgreSQL dengan opsi jaringan pribadi.
Contoh kode
Contoh Kode
Java servlet
Menghubungkan ke Cloud SQL untuk PostgreSQL dari aplikasi Java
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-09-04 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[],[],null,["# Cloud SQL for PostgreSQL documentation\n======================================\n\n[Read product documentation](/sql/docs/postgres/features) Cloud SQL for PostgreSQL is a fully-managed database service that\nhelps you set up, maintain, manage, and administer your\nPostgreSQL relational databases on Google Cloud Platform.\n\n[Learn more](/sql/docs/postgres/features)\n[Get started for free](https://console.cloud.google.com/freetrial) \n\n#### Start your proof of concept with $300 in free credit\n\n- Get access to Gemini 2.0 Flash Thinking\n- Free monthly usage of popular products, including AI APIs and BigQuery\n- No automatic charges, no commitment \n[View free product offers](/free/docs/free-cloud-features#free-tier) \n\n#### Keep exploring with 20+ always-free products\n\n\nAccess 20+ free products for common use cases, including AI APIs, VMs, data warehouses,\nand more.\n\nDocumentation resources\n-----------------------\n\nFind quickstarts and guides, review key references, and get help with common issues. \nformat_list_numbered\n\n### Guides\n\n-\n\n [Create instances](/sql/docs/postgres/create-instance)\n\n-\n\n [Connection overview](/sql/docs/postgres/connect-overview)\n\n-\n\n [Enable and disable high availability on an instance](/sql/docs/postgres/configure-ha)\n\n-\n\n [Create and manage PostgreSQL databases](/sql/docs/postgres/create-manage-databases)\n\n-\n\n [Create and manage PostgreSQL users](/sql/docs/postgres/create-manage-users)\n\n-\n\n [Export and import using pg_dump, pg_dumpall, and pg_restore](/sql/docs/postgres/import-export/import-export-dmp)\n\n-\n\n [Export and import using CSV files](/sql/docs/postgres/import-export/import-export-csv)\n\n-\n\n [Create backups](/sql/docs/postgres/backup-recovery/backups)\n\n-\n\n [Create read replicas](/sql/docs/postgres/replication/create-replica)\n\n-\n\n [Build generative AI applications using Cloud SQL](/sql/docs/postgres/ai-overview)\n\nfind_in_page\n\n### Reference\n\n-\n\n [Client libraries and sample code for Cloud SQL](/sql/docs/postgres/admin-api/libraries)\n\n-\n\n [gcloud sql command-line](/sql/docs/postgres/cloud-sdk)\n\n-\n\n [Use the Cloud SQL Admin API](/sql/docs/postgres/admin-api)\n\n-\n\n [REST API](/sql/docs/postgres/admin-api/rest)\n\n-\n\n [Best practices](/sql/docs/postgres/best-practices)\n\n-\n\n [Performance tips](/sql/docs/postgres/admin-api/how-tos/performance)\n\n-\n\n [Authorize requests](/sql/docs/postgres/admin-api/how-tos/authorizing)\n\n-\n\n [Configure VPC Service Controls](/sql/docs/postgres/admin-api/configure-service-controls)\n\n-\n\n [Cloud SQL Admin API error messages](/sql/docs/postgres/admin-api-error-messages)\n\ninfo\n\n### Resources\n\n-\n\n [Pricing](/sql/docs/postgres/pricing)\n\n-\n\n [Quotas and limits](/sql/docs/postgres/quotas)\n\n-\n\n [Troubleshoot](/sql/docs/postgres/troubleshooting)\n\n-\n\n [Cloud SQL feature support by database engine](/sql/docs/feature_support)\n\n-\n\n [Release notes](/sql/docs/postgres/release-notes)\n\n-\n\n [Billing questions](/sql/docs/postgres/billing-questions)\n\n-\n\n [Getting support](/sql/docs/postgres/getting-support)\n\n-\n\n [Security bulletins](/sql/docs/postgres/security-bulletins)\n\nRelated resources\n-----------------\n\nTraining and tutorials \nUse cases \nCode samples \nExplore self-paced training, use cases, reference architectures, and code samples with examples of how to use and connect Google Cloud services. Training \nTraining and tutorials\n\n### Using Cloud SQL for PostgreSQL with Ruby on Rails 5\n\n\nLearn how to connect a Ruby on Rails 5 app to Cloud SQL for PostgreSQL.\n\n\n[Learn more](/ruby/rails/using-cloudsql-postgres) \nTraining \nTraining and tutorials\n\n### Connecting to Cloud SQL with Cloud Functions\n\n\nLearn how to connect to Cloud SQL from Cloud Functions.\n\n\n[Learn more](https://codelabs.developers.google.com/codelabs/connecting-to-cloud-sql-with-cloud-functions/) \nUse case \nUse cases\n\n### Deploying Pega using Compute Engine and Cloud SQL\n\n\nLearn how to deploy Pega Platform, which is a business process management and customer relationship management (CRM) platform with Cloud SQL for PostgreSQL.\n\nCRM Reference architecture\n\n\u003cbr /\u003e\n\n[Learn more](/solutions/deploying-pega-7-using-compute-engine-and-cloud-sql) \nUse case \nUse cases\n\n### Production launch checklist\n\n\nThis checklist provides recommended activities to complete for launching a commercial application that uses Cloud SQL. This checklist focuses on Cloud SQL-specific activities.\n\nProduction Launch\n\n\u003cbr /\u003e\n\n[Learn more](/sql/docs/postgres/launch-checklist) \nUse case \nUse cases\n\n### Data residency overview\n\n\nLearn how to use Cloud SQL to enforce data residency requirements for data.\n\nData residency data\n\n\u003cbr /\u003e\n\n[Learn more](/sql/docs/postgres/data-residency-overview) \nUse case \nUse cases\n\n### Use Secret Manager to handle secrets in Cloud SQL\n\n\nLearn how to use Secret Manager to store sensitive information about Cloud SQL instances\nand users as secrets.\n\nSecret Manager secret\n\n\u003cbr /\u003e\n\n[Learn more](/sql/docs/postgres/use-secret-manager) \nCode sample \nCode Samples\n\n### Python SQLAlchemy\n\n\nUse SQLAlchemy with your Cloud SQL for PostgreSQL database\n\n\n[Open GitHub\narrow_forward](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/cloud-sql/postgres/sqlalchemy) \nCode sample \nCode Samples\n\n### Node.js sample\n\n\nConnecting to your Cloud SQL for PostgreSQL database in Node.js\n\n\n[Open GitHub\narrow_forward](https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/cloud-sql/postgres/knex) \nCode sample \nCode Samples\n\n### PHP PDO\n\n\nConnecting your Cloud SQL for PostgreSQL database using PHP PDO\n\n\n[Open GitHub\narrow_forward](https://github.com/GoogleCloudPlatform/php-docs-samples/tree/main/cloud_sql/postgres/pdo) \nCode sample \nCode Samples\n\n### Go web app sample\n\n\nSimple examples of connecting to Cloud SQL for PostgreSQL using Go\n\n\n[Open GitHub\narrow_forward](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/cloudsql/postgres/database-sql) \nCode sample \nCode Samples\n\n### .NET sample\n\n\nThis sample application demonstrates how to store data in Google Cloud SQL with a PostgreSQL database when running in Google App Engine Flexible Environment.\n\n\n[Open GitHub\narrow_forward](https://github.com/GoogleCloudPlatform/dotnet-docs-samples/tree/master/cloud-sql/postgres) \nCode sample \nCode Samples\n\n### Terraform for Cloud SQL networking\n\n\nUse Terraform to create Cloud SQL for PostgreSQL instances with private networking options.\n\n\n[Open GitHub\narrow_forward](https://github.com/GoogleCloudPlatform/cloudnetworking-config-solutions) \nCode sample \nCode Samples\n\n### Java servlet\n\n\nConnecting to Cloud SQL for PostgreSQL from a Java application\n\n\n[Open GitHub\narrow_forward](https://github.com/GoogleCloudPlatform/java-docs-samples/tree/master/cloud-sql/postgres/servlet)\n\nRelated videos\n--------------\n\n### Try Cloud SQL for yourself\n\nCreate an account to evaluate how our products perform in real-world scenarios. \nNew customers also get $300 in free credits to run, test, and deploy workloads. \n[Try Cloud SQL free](https://console.cloud.google.com/freetrial)"]]