PostgreSQL Parameters on AWS RDS, Azure, Google Cloud SQL and Oracle OCI: The 2026 Architect’s Guide to Tuning, Security, Audit and Governance
By Shrenik Parekh · Updated October 27, 2026 · 13 min read
TL;DR for solution architects
Every managed PostgreSQL service hides the postgresql.conf file from you and gives you a cloud-specific way to change settings instead. On AWS it is a DB parameter group, on Azure it is server parameters, on Google Cloud it is database flags, and on Oracle OCI it is a configuration. The mechanics, restart behavior and guardrails differ in ways that affect uptime, security and audit evidence.
This guide uses AWS’s official page Working with parameters on your RDS for PostgreSQL DB instance as the anchor and maps it to the other three clouds. You will get:
- How parameters work on each cloud, including what needs a restart
- A baseline of parameters grouped by purpose: security, observability, audit, reliability and performance
- Price, convenience, security and global-availability comparisons
- A governance pattern: parameters as code, drift detection and audit evidence
Related reading on this site: MLOps pipeline design (where I recommend managed PostgreSQL for labeling platforms), my guides to Label Studio and CVAT on multiple clouds, and observability for data and AI pipelines.
1. What AWS documents about RDS for PostgreSQL parameters
The AWS page makes several points every architect should internalize:
- You cannot edit the default parameter group. Default groups (for example
default.postgres13) are read-only. To change any setting, create a custom DB parameter group, edit it, then attach it to the instance. - Parameters are static or dynamic. Static parameters need a reboot to take effect; dynamic ones do not. The page lists
max_connections,shared_buffers,autovacuum_max_workers,autovacuum_freeze_max_age,wal_buffersandshared_preload_librariesas static, while settings such aswork_mem,statement_timeout,log_min_duration_statementandsynchronous_commitare dynamic. - Bad values can stop the database from starting. AWS warns that setting
max_connectionsorshared_bufferstoo high for the workload can leave the instance unable to start, with a “could not map anonymous shared memory” error inpostgres.log. - You can inspect settings several ways: the console, the CLI, the RDS API, or SQL against
pg_settings. - The table is not complete. AWS states it lists “some (but not all)” parameters. Use
aws rds describe-db-parameters --db-parameter-group-name default.postgres13(adjusting the version) for the authoritative list. Note the page still lists legacy names such ascheckpoint_segments,default_with_oidsandsql_inheritance, so always validate against your engine version. - Session-level overrides exist. With privileges, you can also use
ALTER DATABASE,ALTER ROLEandSET. - RDS-specific parameters include
rds.force_ssl,rds.log_retention_period,rds.adaptive_autovacuum,rds.restrict_password_commandsandrds.replica_identity_full.
-- Inspect the effective settings on any PostgreSQL service
SELECT name, setting, boot_val, reset_val, unit, pending_restart
FROM pg_settings
ORDER BY name;# List every parameter available for your engine version
aws rds describe-db-parameters --db-parameter-group-name default.postgres162. How parameters work on each cloud
Topic | AWS RDS for PostgreSQL | Azure Database for PostgreSQL Flexible Server | Google Cloud SQL for PostgreSQL | Oracle OCI Database with PostgreSQL |
|---|---|---|---|---|
Mechanism | Custom DB parameter group attached to the instance | Server parameters pane, CLI, REST API, ARM templates | Database flags set on the instance | Configuration (default or custom) attached to the database system |
Default settings editable? | No, create a custom group | Yes, a subset of parameters is configurable | Yes, a supported subset of flags | No, create or copy a custom configuration |
Restart model | Static needs reboot; dynamic does not | Static needs restart; dynamic changes apply to new connections only | Some flags restart the instance, for example | Configurations are applied to a database system; confirm restart behavior in the OCI docs |
Host or file access | None | None (no | None | None |
CLI example |
|
|
|
|
Extensions | Preloaded through | Supported extensions list | Supported extensions list | Enabled through |
Sources: AWS parameters page, Azure server parameters, Cloud SQL pgAudit documentation, OCI configuration management and OCI configuration creation.
Two cloud-specific surprises worth knowing:
- On Azure, dynamic parameter changes apply only to new connections, so long-lived application pools keep old behavior until they reconnect.
- On OCI, one practitioner write-up reports that parameters inside an existing configuration could not be edited after creation; you copy the configuration and set new values on the copy (Pythian). Oracle’s docs describe copying a configuration as a supported task. Verify current behavior in your region.
3. A parameter baseline by purpose
The values below are starting points to test, not universal answers. Parameter names are standard PostgreSQL, so they carry across clouds, but the allowed set differs. Always confirm each is configurable on your service and version.
Security
Goal | AWS | Azure | Google Cloud | OCI |
|---|---|---|---|---|
Enforce encrypted connections |
|
| Instance SSL enforcement setting (verify exact option name) | Verify in OCI docs |
Restrict password management |
| Use Entra ID authentication where possible | IAM database authentication where supported | OCI IAM policies for the service |
Prevent runaway queries |
|
|
|
|
Azure’s require_secure_transport is the control tested by CIS-style checks; the CIS control 5.2.1 tells you to set it to ON, and an Azure Policy named “Enforce SSL connection should be enabled for PostgreSQL flexible servers” exists for continuous enforcement (Cloudaware summary).
Observability
Parameter | Why it matters | Notes |
|---|---|---|
| Logs slow queries | Start with a threshold your SLO cares about, such as 500 to 1000 ms, and tune |
| Surfaces blocking | Pair with |
| Finds queries spilling to disk | Often signals a low |
| Shows slow or blocked autovacuum | Critical for bloat investigations |
| Capacity and security trail | Watch log volume and cost |
| Adds I/O timing to statistics | Small overhead; test first |
| Query-level statistics | Static on AWS, so needs a reboot |
| How long RDS keeps logs | Export logs to central storage for longer retention |
Audit
Use the open-source pgAudit extension on every cloud that supports it. AWS lists pgaudit among supported shared_preload_libraries values. On Google Cloud, you enable it with cloudsql.enable_pgaudit=on and pgaudit.log settings; Google documents that changing the flag restarts the instance, and a typical secure example is:
gcloud sql instances patch INSTANCE_NAME \
--database-flags cloudsql.enable_pgaudit=on,pgaudit.log=ddl,role,writeThe ddl, role, write selection is a common middle ground; pgaudit.log=all produces very high volume. Confirm the supported extension list on Azure and OCI before you design audit controls.
Reliability
- Autovacuum: keep
autovacuumon; tuneautovacuum_vacuum_scale_factor,autovacuum_vacuum_cost_limitandautovacuum_max_workers(static on AWS) for large, busy tables. On AWS,rds.adaptive_autovacuumadjusts autovacuum when transaction ID thresholds are exceeded. - Wraparound protection: monitor
autovacuum_freeze_max_ageand database age; this is a top cause of avoidable emergencies. - WAL and checkpoints:
max_wal_size,checkpoint_timeoutandcheckpoint_completion_target. AWS notes that for RDS for PostgreSQL 16 and later,max_wal_sizeis set automatically from allocated storage: 6 GB for 100 GB or more, 2 GB for less. - Replication cost: AWS warns that
rds.replica_identity_full= on can raise IOPS because more data goes to the WAL.
Performance
max_connectionsandshared_buffers: change carefully and test, as AWS documents the start-failure risk. Prefer a connection pooler (for example PgBouncer or the cloud’s proxy offering) over very highmax_connections.work_mem: applies per sort or hash operation per session, so large values multiply under concurrency. Raise it for specific roles withALTER ROLEinstead of globally.effective_cache_size,random_page_cost,effective_io_concurrency: planner hints; tune withEXPLAINevidence.synchronous_commit: trade durability for latency only where the business accepts it.
4. Price: what parameters change in your bill
Parameters rarely have a price tag, but they change what you consume:
Parameter choice | Cost effect |
|---|---|
Verbose logging, | More log storage, ingestion and egress |
High | Larger memory footprint, pushing you to bigger instance classes |
| Extra WAL and IOPS |
Aggressive checkpoints | More I/O |
Long log retention | More storage |
Service-level pricing differs by cloud, so check the official pages for current numbers: Amazon RDS for PostgreSQL pricing, Azure Database for PostgreSQL pricing, Cloud SQL pricing and OCI Database with PostgreSQL pricing. I did not retrieve the AWS, Azure or Google price tables for this post, so use their calculators.
For OCI, Oracle states pricing is a fee on top of standard compute and block storage, with one SKU for compute by OCPU and one for Database Optimized Storage by GB used, and standard Object Storage fees for backups. Oracle also claims lower cost than other managed PostgreSQL services based on its own 2023 comparison (Oracle blog); treat vendor comparisons as marketing and run your own workload test.
5. Convenience: infrastructure as code beats consoles
The fastest, safest path on any cloud is to manage parameters in code and apply them through a pipeline. Terraform sketch for AWS:
resource "aws_db_parameter_group" "pg_baseline" {
name = "pg16-baseline"
family = "postgres16"
parameter {
name = "log_min_duration_statement"
value = "1000"
apply_method = "immediate" # dynamic
}
parameter {
name = "shared_preload_libraries"
value = "pg_stat_statements,pgaudit"
apply_method = "pending-reboot" # static
}
}Equivalent commands:
# Azure
az postgres flexible-server parameter set \
--resource-group <rg> --server-name <server> \
--name require_secure_transport --value on
# Google Cloud
gcloud sql instances patch <instance> --database-flags cloudsql.enable_pgaudit=on
# Oracle OCI
oci psql configuration create --compartment-id <ocid> \
--db-version <version> --display-name <name> \
--db-configuration-overrides file://overrides.jsonSafe change runbook for static parameters:
- Change the value in a non-production environment first and run a load test.
- Take a snapshot or backup and confirm a restore works.
- Schedule the restart in a maintenance window; use a Multi-AZ or high-availability setup so the outage is as short as the service allows.
- Apply, then verify with
SHOWandpg_settings(including thepending_restartcolumn). - Record the change ticket, the diff and the result as audit evidence.
More on safe change patterns in my post on cloud exit and portability strategies.
6. Security
Layer | AWS | Azure | Google Cloud | OCI |
|---|---|---|---|---|
Identity | IAM, IAM database authentication | Entra ID | IAM, Cloud SQL IAM authentication | OCI IAM policies |
Who can change parameters | IAM permissions on parameter groups and instances | Azure RBAC | IAM roles on the instance | IAM policy, for example |
Encryption at rest | KMS | Key Vault, customer-managed keys | Cloud KMS | Vault |
Network isolation | VPC, security groups | Private access (VNet) | Private IP | VCN |
Posture checks | AWS Config, Security Hub | Azure Policy, Defender for Cloud | Security Command Center | Cloud Guard |
Treat permission to modify parameter groups, flags or configurations as privileged. A single change to log_statement, rds.force_ssl or shared_preload_libraries can weaken security or break production. Separate roles for “propose” and “approve”, and alert on every parameter change event.
7. Global availability and multi-region considerations
- Parameter objects are regional. AWS parameter groups appear per Region in the console, so a multi-Region design needs the same group created in each Region, which is a strong reason to use IaC.
- Version and feature support vary by region and engine version. Confirm that the PostgreSQL major version, extensions and parameters you need are offered in every target region on each cloud. I did not verify region lists for this post.
- OCI: Oracle describes consistent pricing across regions (Oracle blog); confirm service availability per region in the OCI documentation.
- Standardize on a baseline per PostgreSQL major version so replicas, disaster recovery regions and migration targets behave the same.
8. Applications, databases, observability, auditability and governance
Applications
- Set
application_namein every connection string so logs and statistics identify the calling service. - Use connection pooling and set pool sizes with the parameter limits in mind; AWS’s start-failure warning is a reminder that
max_connectionsis not a free dial. - Set
statement_timeoutper role for application accounts, with longer limits for migration and batch roles. - Treat reconnects as a deployment step after dynamic changes on Azure.
Databases
- Pin PostgreSQL major version and parameter baseline together in each environment.
- Version-control parameter files; separate OLTP, reporting and batch profiles with different baselines.
- Monitor
pg_settings.pending_restartto find changes waiting on a restart.
Observability
Send database logs and engine metrics to one platform and standardize traces with OpenTelemetry. Alert on:
- Slow-query counts and p95 latency
- Lock waits and deadlocks
- Temp-file creation
- Autovacuum lag and transaction ID age
- Connection saturation
- Parameter change events
Auditability
- Enable pgAudit and ship its output to immutable storage.
- Capture control-plane events: CloudTrail on AWS, Azure Activity Log, Cloud Audit Logs on Google Cloud, OCI Audit.
- Keep a record linking each parameter change to a ticket, approver and test result.
Governance
- Baseline as code with peer review.
- Drift detection: AWS Config, Azure Policy, Google Cloud posture tools and OCI Cloud Guard can flag non-compliant settings; the Azure SSL policy and the Cloud SQL pgAudit CIS control are both examples.
- Benchmarks: map your baseline to the CIS Benchmarks and your regulatory regime.
- Frameworks: align with the NIST AI Risk Management Framework and ISO/IEC 42001 when the database feeds AI systems.
- Exception process: document who may deviate from the baseline and for how long.
See my AI governance checklist for enterprise architects for the broader control set.
9. Which approach fits you?
Your situation | Recommendation |
|---|---|
AWS-centric, many microservices | Standard parameter-group baseline per major version in Terraform, Config rules for drift |
Microsoft-centric, Entra ID everywhere | Flexible Server with |
Google Cloud data platform | Cloud SQL flags managed in code, pgAudit sent to Cloud Logging |
Oracle workloads moving to PostgreSQL, cost sensitive | OCI Database with PostgreSQL, using custom configurations; verify features and extensions first |
Multi-cloud estate | Cloud-neutral baseline expressed as PostgreSQL parameter names, translated per cloud by a thin IaC layer |
Frequently asked questions
What is an RDS PostgreSQL parameter group? It is a named set of PostgreSQL settings you attach to an RDS instance. Default groups are read-only, so you create a custom group to change values.
Do all parameter changes need a reboot on RDS? No. Static parameters need a reboot; dynamic ones do not.
Can bad parameters take my database down? Yes. AWS warns that oversized max_connections or shared_buffers can prevent the instance from starting.
How do I enforce SSL on each cloud? Use rds.force_ssl on AWS and require_secure_transport on Azure; for Google Cloud and OCI, use the service’s SSL or TLS enforcement settings and verify them in the current documentation.
How do I enable auditing? Use pgAudit. On AWS add pgaudit to shared_preload_libraries; on Google Cloud set cloudsql.enable_pgaudit=on, which restarts the instance.
Key takeaways
- Parameters are the control surface of a managed PostgreSQL service; each cloud exposes them differently, but the PostgreSQL names are shared.
- Know which settings are static before you schedule a change, and never raise
max_connectionsorshared_bufferswithout testing. - Parameters influence cost mainly through logging, memory and I/O, not through a direct price.
- Manage the baseline as code, detect drift, and keep audit evidence for every change.
References and further reading
- AWS, Working with parameters on your RDS for PostgreSQL DB instance and Parameter groups for Amazon RDS.
- PostgreSQL, pg_settings view.
- Microsoft, Server parameters in Azure Database for PostgreSQL Flexible Server.
- Google Cloud, Cloud SQL for PostgreSQL pgAudit.
- Oracle, Managing OCI Database with PostgreSQL configurations, Creating a configuration and pricing.
- Pythian, Getting started with the OCI PostgreSQL service (practitioner article).
- CIS, Azure control 5.2.1 on require_secure_transport and CIS Benchmarks.
- NIST, AI Risk Management Framework; ISO, ISO/IEC 42001; OpenTelemetry.
Parameter names, defaults, prices and regions change often. Verify against each provider’s documentation for your PostgreSQL version before you change production.
Leave a Comment