PostgreSQL vs the AWS, Azure and Google Cloud managed equivalents

Self-hosted PostgreSQL gives you control over versions, configuration and data placement, and you run backups, failover and upgrades. RDS, Azure and Cloud SQL run those tasks for you within their version lists and settings.

On this page

Self-hosted PostgreSQL or managed PostgreSQL: which fits your team

A team with PostgreSQL on its shortlist both as software it runs itself and as a managed service from AWS, Azure or Google Cloud should self-host when it needs control over versions, extensions, settings and data location, and it has people to run backups, failover and upgrades. A managed service fits when the provider's version list and settings cover the workload and the team wants operations handled. Amazon RDS for PostgreSQL, Azure Database for PostgreSQL (flexible server) and Cloud SQL for PostgreSQL all run community PostgreSQL, so the engine is the same on every side of this choice. The decision turns on operating capacity and how much control your requirements demand.

Start with the version list, because it sets your upgrade calendar. PostgreSQL 18 is supported until November 14, 2030, 17 until November 8, 2029, 16 until November 9, 2028 and 15 until November 11, 2027, and 14 reached its final release on November 12, 2026. Cloud SQL lists versions 9.6 to 18 with 18 as the default, and PostgreSQL 19 was first released on November 19, 2026, so ask each provider when it will offer 19 and how long it keeps older majors. On your own servers, a minor update means installing new binaries and restarting, with no dump and restore. Major upgrades still need a dump and reload, pg_upgrade or logical replication, and skipped majors need their release notes reviewed first. Write down the major version you need and its end-of-support date before comparing providers. The PostgreSQL versioning policy sets out the support windows.

Cost and effort follow the same split. PostgreSQL uses the PostgreSQL License, a permissive license, so self-hosting carries no license fee. The cost is staff time for backups, restore tests, failover design, monitoring, patching and minor releases, which arrive at least every three months, plus the VMs or Kubernetes capacity and storage underneath. A managed service adds a recurring charge for instances and storage, and the provider runs the platform, though your team still owns schema design, query tuning and the restore process it tests. In the quote, ask which backup retention, point-in-time recovery, high availability option, maintenance window control and extension list are included. Also ask what a move out costs, since migration effort is the switching cost: Azure documents Azure Database Migration Service or pg_dump and pg_restore for moving data.

Which managed PostgreSQL service matches your cloud

This table maps each major cloud to its managed PostgreSQL service and shows how closely that service matches self-hosted PostgreSQL, plus what to confirm before you commit. All three run community PostgreSQL, so the differences sit in the operating layer, version availability and configuration limits. Read the last row with the others, because the managed services take over the HA tooling you would otherwise run yourself.

ProviderManaged serviceHow close to self-hosted PostgreSQLWhat to confirm
AWSAmazon RDS for PostgreSQLRuns community PostgreSQL, so SQL and client tools carry over; host access is replaced by AWS controls.Supported major versions and end dates, extensions available on your target version, parameter group settings, and how major upgrades are scheduled.
Microsoft AzureAzure Database for PostgreSQL flexible serverRuns community PostgreSQL; Azure documents pg_dump and pg_restore or Azure Database Migration Service for moving data in.Server parameters you can change, extensions the server allows, maintenance windows, and which major versions are offered in your region.
Google CloudCloud SQL for PostgreSQLRuns community PostgreSQL; Cloud SQL lists versions 9.6 to 18, with 18 the default.Lists 9.6 to 18, but community support ended for 13 and earlier, so confirm the version you deploy stays supported.
Tooling (Patroni, CloudNativePG)No managed counterpart from AWS, Azure or Google CloudFailover design and backup mechanics belong to the provider, so Patroni or CloudNativePG settings do not apply.Failover behavior, backup and restore options, and any recovery objectives written into your service agreement.

What a managed PostgreSQL service takes away and adds

A managed PostgreSQL service removes host patching, failover engineering and much of the day-to-day operating work from your team. In return, it sets the version, extension list, administrative access and region options. Each card below names one trade-off and the condition under which it matters most, which is usually when the database carries compliance, residency or uptime requirements that the provider's defaults may not meet.

Version lag on the provider's schedule

A managed service sets the PostgreSQL major version on its own schedule, so you inherit its lag. Cloud SQL for PostgreSQL lists versions 9.6 to 18, with 18 as the default, while PostgreSQL 19 had its first release on November 19, 2026. Confirm PostgreSQL 19 availability with the provider before you set an upgrade date or a new deployment target. On your own servers you choose the major version, and PostgreSQL ships a minor release at least every three months for each supported major, so you control when those patches land.

Cloud SQL versions

Extensions and server parameters

Managed services publish an allowed list of extensions and a set of configurable server parameters, and anything outside that list waits until the provider adds it. Self-run PostgreSQL lets you install the extensions your application needs and set parameters at the server level, but your team then tests each extension against every minor and major upgrade. Check each extension and parameter your application depends on against the provider list for the exact version you plan to run. Provider lists differ, so compare them engine version by engine version.

Host and superuser access

A managed service runs the operating system, the server binaries and the superuser role, and hands you an administrative role that the provider defines. You give up shell access for diagnostics, custom archive scripts and some OS-level tuning, and you stop patching the host yourself. On your own VMs or Kubernetes cluster, your team controls those layers and the audit trail for them. Ask which privileges the administrative role lacks, and whether that set satisfies your privileged access rules and your logging requirements.

Failover design and who owns it

A managed service runs its own standby and failover, and you can only review how it behaves. Running PostgreSQL yourself means choosing the tooling and operating it: Patroni, which runs PostgreSQL 9.3 to 18 with ZooKeeper, etcd, Consul or Kubernetes as its configuration store, or CloudNativePG, which uses the Kubernetes API server for failover. Each choice moves quorum, split-brain protection and failover drills onto your team, and Patroni's stated range also ends at 18, so check 19 support there too. Ask the provider for documented failover timing, standby readability and test evidence.

Patroni documentation

Data location and region choice

A managed service places your database in the regions and zones it offers, so your choice is limited to what the provider exposes. Self-run PostgreSQL on your VMs, Kubernetes cluster or data center lets you pin data to a site, an air-gapped network or a jurisdiction, but your team then owns replicas, backups and off-site copies. Confirm the regions that host the service, where backups are stored and who at the provider can reach the data. Those answers feed directly into your residency decision and the evidence your assessors will request.

The exit path and its effort

Leaving a managed service is a migration project, and its effort rises with data size and downtime tolerance. Major upgrades can use dump and reload, pg_upgrade or logical replication, and logical replication works between major versions with only several seconds of downtime. Azure's documentation lists Azure Database Migration Service or pg_dump and pg_restore as migration options. A small database with a long window can use dump and restore, while a large one with a short window needs logical replication, a rehearsed cutover and a rollback plan. Ask the provider which export tools it supports and whether exports carry charges.

PostgreSQL upgrade docs

Decision path for self-hosted PostgreSQL, Kubernetes and managed services

The path starts with one question: must the database stay on infrastructure you control, including host access? If yes, go straight to the Kubernetes question. If no, check whether the provider's version list and settings cover the extensions and PostgreSQL major you need. If they do, a managed service in your cloud fits. If they do not, the Kubernetes question decides: a team that runs Kubernetes leads to self-hosted CloudNativePG 1.30.1, and otherwise the path ends at self-hosted Patroni 4.1.5 on virtual machines. Confirm that the chosen tool supports PostgreSQL 19 before you commit.

Three questions lead to a managed service or one of two self-hosted tools.

Where PostgreSQL data lives and who can reach it

Self-hosted PostgreSQL leaves the location decisions with your team. You choose the cloud account, data center or air-gapped network where the cluster runs, the volumes that hold the data directory and write-ahead logs, the key management service that encrypts those volumes and the backup target that receives base backups and archived WAL. A provider is involved in that chain only if you choose a provider-hosted key service or an off-site bucket. Write down all four locations before the design review, and check that the backup target sits in the jurisdiction your data rules require. Access is also yours to shape: operating system accounts, PostgreSQL roles, network paths to port 5432 and the people with root on the hosts are set by your team, so the access list is only as broad as you make it.

A managed service such as Amazon RDS for PostgreSQL, Azure Database for PostgreSQL (flexible server) or Cloud SQL for PostgreSQL runs community PostgreSQL in the provider's regions, with the instance provisioned into your cloud account or project. The location questions then move to the provider's documentation and contract, and you need written answers to four of them. Confirm which regions and availability zones you can choose, and whether automated backups and snapshots stay in the same region or are copied elsewhere. Ask who on the provider side can reach the database host, the storage and the backup store, under what approval and logging, and whether support staff can access customer data during an incident. Ask how encryption keys are created, held, rotated and revoked, and whether you can hold your own key. A region list on a product page does not answer any of these, so ask for the terms in writing, as described in the Amazon RDS for PostgreSQL user guide.

Compliance work follows the same split. Your team owns the evidence for whichever controls apply to where data sits and who can reach it, such as the location record, the key policy, access reviews and backup restore tests. DeployOpen can plan and build these systems inside your infrastructure and prepare the configuration, logs and documentation an assessor will ask for. DeployOpen does not issue audit reports, attestations or certifications. Independent auditors and certification bodies issue those, and they decide what counts as sufficient evidence for your scope. Bring your assessor in before the design is final, so the key management and backup decisions described above are recorded in the form they expect.

How PostgreSQL upgrades, backups and scaling differ by option

On virtual machines, your team owns every layer: the operating system, PostgreSQL binaries, Patroni, the configuration store and the backup chain. Patroni documentation describes PostgreSQL 9.3 to 18 support, so confirm PostgreSQL 19 support before you plan to run it.

  • Minor upgrades. Stop the server, install the new binaries and restart. No dump and restore is needed, because minor releases never change the internal storage format. Update standbys first, switch over, and keep the sequence in a runbook.
  • Major upgrades. Choose dump and reload, pg_upgrade or logical replication, then rehearse the path on a copy of production data. Review the release notes for every skipped major before you start.
  • Backups. Patroni does not take backups. Pick a tool such as pgBackRest or Barman, set retention, encryption and off-site copies, and test restores on a schedule.
  • Scaling and monitoring. Add standbys to increase read capacity and recovery options, and resize VMs for write capacity. Patroni exposes a REST API for cluster state that you can scrape into your metrics stack.

Check that your configuration store, backup tool and monitoring agents support the PostgreSQL major you plan to run.

What drives the cost of self-hosted and managed PostgreSQL

The PostgreSQL engine carries no license fee on either path. PostgreSQL is released under the PostgreSQL License, a liberal open source license similar to the BSD or MIT licenses, so the cost difference comes from three places: the infrastructure you provision, the staff time spent on backups, failover, upgrades and on-call, and the service charges a managed provider adds on top. Staff time is the line item most likely to be missing from a comparison because it never appears on a cloud invoice. Amazon RDS, Azure Database for PostgreSQL and Cloud SQL all run community PostgreSQL, so the engine itself does not separate the two options. Your real decision is which operating tasks you want to keep in-house, and what each one costs in hours and risk.

Separate one-time and recurring costs before you compare totals. One-time work includes architecture and high availability design, the initial build, restore testing and the data migration. Azure's overview names Azure Database Migration Service or pg_dump and pg_restore as migration options, so the method you choose sets much of the one-time effort. Recurring costs include compute, storage, backup storage and network on the infrastructure side, plus operations time. Minor updates mean replacing binaries and restarting the server, while major upgrades use dump and reload, pg_upgrade or logical replication, which the upgrade documentation describes as allowing major upgrades with only several seconds of downtime. Each major version receives five years of support, and PostgreSQL 14 reached its final release on November 12, 2026, so any cluster still on it needs a funded upgrade plan now.

When you request quotes, ask for itemized service charges so compute, storage, backup storage, I/O, data transfer and any standby instance appear as separate lines. Confirm whether high availability is included or billed as a second instance, how long backups are retained by default, what extended retention costs, and who performs major upgrades and how much downtime to expect. Ask what exit assistance covers, including the export format and whether data egress is charged when you leave. Current figures must come from each provider's own pricing pages, because rates can vary by region and configuration. For the self-hosted path, a DeployOpen quote follows from a written scope that lists the infrastructure, the high availability design and the support you need, so both totals rest on the same assumptions.

Moving PostgreSQL between self-hosted and a managed service

This sequence moves a PostgreSQL database between a self-hosted server and a managed service in a fixed order: inventory, method choice, rehearsal, cutover and an exit test. It produces a move that can be rolled back and a documented way to leave the managed service later.

  1. Inventory version, extensions and parameters

    The platform or database team lists the current PostgreSQL major version, every installed extension, custom server parameters, roles, and high availability and backup requirements. Each item is checked against what the target service documents, including Amazon RDS for PostgreSQL, Azure Database for PostgreSQL flexible server and Cloud SQL for PostgreSQL. Cloud SQL lists versions 9.6 to 18 with 18 as the default, so confirm that the version you need is offered. Done when every item is marked supported, replaced or blocked, and each blocked item has a named owner.

  2. Choose dump and restore or logical replication

    Pick the method for each database. Dump and restore with pg_dump and pg_restore fits moves where the application can pause writes for the full copy, and Azure's overview lists these tools alongside Azure Database Migration Service as migration routes. Logical replication works between different major versions, and the PostgreSQL upgrade documentation describes only several seconds of downtime for major upgrades that use it, though your workload sets the real figure. Check what logical replication does not carry, such as schema changes and sequence values, and confirm the replication settings are available on each provider. Done when the method, expected write pause and fallback are written down for each database and approved by its application owner.

  3. Rehearse restores and application tests

    Restore a recent copy into a target instance running the same major version you plan to operate, then run the application test suite and the most important queries against it. Check that every extension loads, that roles, collations and encodings match the source, and that query timings are acceptable on the provider's instance size. If the move crosses major versions, review the release notes for every major version you skip before this rehearsal, because PostgreSQL allows skipping intermediate majors. Done when a full rehearsal completes with recorded timings and every compatibility defect is either closed or accepted in writing.

  4. Cut over with a written rollback plan

    The team freezes writes on the source, runs the final dump or waits for replication to catch up, and compares row counts and sample checksums on key tables before switching connection strings. The rollback plan is written before the window opens. It names the conditions that trigger a return, who makes that call, and how writes accepted by the target get back to the source, either through reverse replication or a dump from the target. Keep the source intact and read-only until the agreed review point. Done when the runbook has been rehearsed once, the go and no-go checks are signed, and the rollback path has been tested.

  5. Plan the reverse move off the managed service

    Before committing to the managed service, prove the exit path with the same tools. Confirm that you have export access to the managed instance, that pg_dump or logical replication settings are available there, and that each extension you use is available in the self-hosted build you would run. Restore a managed export into a self-hosted PostgreSQL server of the same major version and run the application tests against it. Done when the export, restore and extension checks are recorded and the provider's terms on data export are confirmed in writing.

PostgreSQL questions buyers ask before choosing a path

What drives the cost of running PostgreSQL yourself versus a managed service?

Self-hosted PostgreSQL costs are mostly the infrastructure and staff time you pay for directly, while a managed service bundles those into a metered bill. PostgreSQL is released under the PostgreSQL License, so the software itself carries no license fee. On your own infrastructure you pay for compute, storage, backup targets, monitoring and the people who patch, test restores and plan upgrades. A managed service charges for instances, storage, backup retention and high availability configuration, and the bill rises with instance size and replica count. Ask any quote to itemize who pays for hardware, who runs failover, who tests restores and whether support is included. Those answers, more than the license, decide the total.

How long does it take to move PostgreSQL off a managed service?

The duration depends on database size, the write rate during cutover, the downtime the business accepts and how many applications connect to the database. Two migration routes are common: dump and restore, or logical replication, which the PostgreSQL upgrading documentation describes as working between different major versions with downtime of several seconds for major upgrades. Azure's overview lists Azure Database Migration Service or pg_dump and pg_restore as its migration options, so the tooling is similar on either side. Extensions, roles, connection strings and DNS changes add time that no document can estimate for you. Rehearse the cutover on a copy, measure replication lag and time the restore, then write those measured steps into the scope and treat any calendar figure as something to confirm.

What does a PostgreSQL move need from our engineering team?

It needs engineers who can own the database after the project ends: someone for schema and extension review, someone for backup and restore design, someone for monitoring, and an application owner who tests connection handling during failover. The work runs through planning, build, cutover and handover, and each step should be written down before it starts. DeployOpen plans, implements, hardens, backs up, upgrades, documents and supports self-hosted platforms inside your own cloud accounts, data centers or air-gapped networks. Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work begins. Your staff still decide data placement, access and retention, and they must attend the cutover rehearsal. Confirm which tasks pass to your team at handover and which stay with the provider.

Can our own staff run self-hosted PostgreSQL after go-live?

Yes, if your team already has database administration skills and time to keep them current, but the database is often a side task for engineers who are already stretched. Routine work includes minor upgrades, which PostgreSQL documents as replacing executables and restarting the server, and major upgrades, which need a dump and reload, pg_upgrade or logical replication plus a review of release notes. Operators also own backups, restore tests, failover configuration, monitoring and capacity planning. Ask who is on call when a failover fails at night and how long your team can cover that without a gap. DeployOpen offers ongoing support, upgrades and continuous testing as retainers, which can take repetitive work off your staff while your team keeps the decisions. Confirm the split in writing before go-live.

Does a managed PostgreSQL service remove backup testing and upgrade planning?

No. A managed service takes over some mechanics, such as running backup jobs and applying patches, but proving that a restore works and choosing when to upgrade stay with you. Amazon RDS for PostgreSQL, Azure Database for PostgreSQL and Cloud SQL for PostgreSQL all run community PostgreSQL, so the upgrade rules still apply and you still need to test application behavior against each new major. No platform knows which of your queries, extensions or client drivers change behavior after an upgrade. Auditors and assessors will still ask for restore test records, retention settings and change approvals, and your organization must produce them. Confirm with the provider exactly which backups, retention settings and restore tests it covers, and whether its upgrade timing fits your change calendar.

Which PostgreSQL major version should we plan for now?

For new deployments, consider 19, first released November 19, 2026, or 18 if your extensions or managed service do not yet support 19. For existing estates, plan to leave 14 before its final release on November 12, 2026. According to the PostgreSQL versioning policy, 15 ends November 11, 2027, 16 ends November 9, 2028, 17 ends November 8, 2029, 18 ends November 14, 2030 and 19 ends November 19, 2031. PostgreSQL ships a major release about once a year and a minor release at least every three months, so a supported major still needs regular patching. Managed providers can lag the community release, and Cloud SQL lists 18 as its default, so check the versions your provider offers before choosing. Finish each upgrade well before the end date of the version you run.

How DeployOpen helps you run PostgreSQL yourself or move it

DeployOpen helps teams that want PostgreSQL in their own infrastructure, or that are moving off a managed service, plan, build and hand over that database. Deployments run inside your cloud account, data center or air-gapped network, and the written scope fixes the PostgreSQL major version, high availability design, backup approach and access controls. Engagements are fixed-scope, with ongoing support available as a retainer.

How we scope

  • The written scope names the PostgreSQL major versions, clouds or hypervisors, and data locations in play.
  • We confirm which managed features your team relies on, such as failover, point-in-time recovery and extensions, before build starts.
  • Scope records who runs each layer after handover, including operating system patching, database upgrades and backup restore tests.

How we build

  • We deploy PostgreSQL on virtual machines or Kubernetes inside your cloud account, data center or air-gapped network.
  • Failover, backups and access controls are configured and tested against the written scope.
  • Migrations off a managed service start from the export path your provider documents, then are rehearsed before cutover.

How we hand over

  • Handover includes architecture, runbooks, configuration and the backup and restore procedure, written for your operators.
  • Runbooks cover minor updates and major upgrades, starting with release notes for every skipped version.
  • Evidence for assessors, such as configuration records and access reviews, is prepared for your independent auditor, who issues any report.

How we support

  • Retainers can cover ongoing support, minor updates, major upgrades and continuous testing.
  • Ask whether the retainer covers major upgrades before each PostgreSQL major's end-of-life date.
  • Ask for upgrade and monitoring responsibilities to be written into the scope, so no layer is unowned after handover.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.