PostgreSQL for SaaS and technology companies

PostgreSQL as the core database of a SaaS product, planned for tenancy, scale, SOC 2 evidence and the true cost of running it yourself versus a managed service.

On this page

Why SaaS teams run PostgreSQL as their core database

For a SaaS engineering leader, the product database is three things at once: the boundary that keeps one customer's rows away from another's, the component that sets the ceiling on growth, and the system auditors ask about first when a customer or a SOC 2 examiner wants evidence of control. PostgreSQL is a common choice for this role because its license and release policy give the team control over that data path. The PostgreSQL License is a liberal open source license similar to the BSD and MIT licenses, so the product can embed, host and modify the database without a per-core license negotiation. The project ships a new major version about once a year, issues minor releases at least once every three months, and supports each major version for 5 years after its initial release, which gives engineering leaders a predictable window for planning upgrades.

Those properties matter most once the team runs the database in infrastructure it controls. The company then owns the decisions a managed service would otherwise make for it: which minor release is applied and when, how pg_hba.conf and TLS are configured, where WAL archives are stored, and which tenancy controls such as row-level security are enforced at the database layer. Each of those decisions becomes a control that must be designed, operated and shown to an assessor. Before committing, confirm which PostgreSQL major version the product will run and its end-of-support date in the PostgreSQL versioning policy, and ask who on the team owns patching, backup verification and failover for each environment.

SaaS requirements that shape the PostgreSQL build

This table maps the regulatory and assurance requirements that a SaaS vendor meets through its database, with the supplied source for each and what it means for schema, access, backups and exit planning. Read each row as a design input to settle before the schema is written, not as a finished control. Requirements tied to SOC 2 and GDPR are the ones most often discovered late, when the database already holds customer data.

RequirementWhat it asks forWhat it means for the PostgreSQL build
SOC 2 common criteria CC6 (logical access)Restrict logical access to systems and data to authorized users, and review that access over time, under the 2017 Trust Services Criteria (AICPA)Create separate database roles for application, migration and support staff. Use pg_hba.conf rules and SCRAM or certificate authentication, and record who holds which role so access reviews can be run from the database itself.
SOC 2 common criteria CC7 (system operations)Detect and respond to security events and monitor the system for anomalies (AICPA)Enable connection, DDL and privileged-role logging and send it to a log system the vendor controls. Confirm that log retention matches the period the auditor will sample.
SOC 2 common criteria CC8 (change management)Authorize, test and approve changes to infrastructure and software before they reach production (AICPA)Put schema migrations and major or minor PostgreSQL upgrades through the same reviewed pipeline as application code. Keep a record of each change, its approver and the test evidence.
SOC 2 common criteria CC9 (risk mitigation)Identify and manage risks from vendors and business disruption (AICPA)Document which database services are self-hosted and which are bought from third parties, and what each vendor's exposure is. Include the database in the vendor risk register.
GDPR Article 28(3) (processor instructions)Processor contracts must limit processing to documented instructions, including for transfers (GDPR)Customer tenant data should only be moved, copied or exported on documented instructions. Restrict cross-region replicas and analytics exports to the regions and purposes named in the data processing agreement.
GDPR Article 32 (security of processing)Take the security measures needed for the risk, such as encryption, confidentiality and resilience of systems (GDPR)Plan encryption in transit with TLS and decide how encryption at rest is provided at the storage layer. Test restores as part of resilience, since availability is part of security of processing.
EU Data Act switching rules (Articles 23, 25, 50)Customers may switch to another provider or to on-premises infrastructure, with a maximum two-month notice period and a 30-day transitional period (Data Act)Design exports in an open, documented format, such as SQL dumps or CSV per tenant, that a customer can load elsewhere. Keep tenant identifiers consistent so data can be separated cleanly at exit.
EU Data Act switching charges (Article 29)From 12 January 2027, switching charges may not be imposed. Until then, reduced charges may not exceed costs directly linked to switching (Data Act)Track the cost of exports, egress and support time for each customer switch. Ask finance and legal to confirm which charges are allowed in each period before quoting exit fees.
Tenancy model and row-level securityNot a regulatory requirement, but auditors test whether tenant isolation is enforced (AICPA criteria on logical access)Choose between shared tables with a tenant column, schema per tenant or database per tenant. Where row-level security is used, test it with each role and treat the policies as access controls under review.

Choosing a tenancy model: shared schema, schema per tenant or database per tenant

All customers share the same tables, and each row carries a tenant key such as tenant_id. This model has the lowest number of database objects and the simplest migration path, because one ALTER TABLE reaches every tenant at once. Isolation depends on the application and on PostgreSQL row-level security policies that filter rows by tenant. A missed filter in application code is the main risk, so isolation should be enforced in the database rather than trusted to every query.

  • Isolation: Row-level security policies can enforce the tenant key for every session, but they must be tested with the roles the application actually uses, including the table owner, which bypasses policies unless forced.
  • Migrations: A schema change runs once, but a long lock or a slow backfill affects all customers together, so large changes need batching and a rollout plan.
  • Backup and restore: Restoring one customer's data means extracting rows from a shared dump, which is slower and needs careful handling of foreign keys and related records.
  • Replicas: Read replicas serve all tenants, and replica lag affects every customer equally, so routing reads by tenant is an application decision.
  • Connection pooling: One pool serves every tenant, which keeps connection counts low, but session settings such as the tenant identifier must be reset between uses.

Check whether your contracts require data separation for each customer, and test the row-level security policies against your real roles before committing to this model.

Row-level security, replicas, Citus and pooling in a SaaS stack

A SaaS product depends on a few PostgreSQL components working together: how tenant data is isolated, how reads scale, how writes are distributed, how connections are managed and how users and services authenticate. Each choice changes what the application code, the on-call rota and the security review must handle, so decide them together rather than one at a time.

Row-level security keyed to tenant identity

Row-level security policies make PostgreSQL filter rows by a condition, such as a tenant identifier set for the current session, so a query that omits the tenant filter still returns only that tenant's data. The application must set the tenant context on every connection or transaction, and a missed setting can fail closed or open depending on policy design. Check that table owners and the application role do not bypass policies, and test cross-tenant reads as part of release testing.

High availability docs

Hot standby replicas for read traffic

Hot standby servers accept read-only queries while they replicate from the primary, so reporting, exports and heavy read endpoints can move off the primary. The application needs a routing layer that knows which queries can tolerate replica lag, and users may notice stale data right after a write. Plan for lag monitoring and for the reads that must always go to the primary, such as checks immediately after a payment or permission change.

Synchronous versus asynchronous replication

With synchronous replication a commit waits until one or more standbys confirm it, which protects committed tenant data at the cost of write latency and availability when standbys are slow. Asynchronous replication keeps writes fast but can lose the most recent commits if the primary fails. Choose per workload: billing and access-control changes often justify synchronous commit, while telemetry or activity logs often do not. Confirm the exact trade-off with your recovery point target before setting the mode.

Citus for distribution by tenant key

Citus extends PostgreSQL to spread tables across multiple nodes, and distributing tables by a tenant key keeps each tenant's rows together so most queries touch one node. This suits multi-tenant products that outgrow one server, but it constrains the schema: unique keys, foreign keys and joins across tenants need to include the distribution column. Test migrations, cross-tenant analytics and tenant rebalancing before committing, because moving a large tenant later is operational work.

PgBouncer connection pooling

PgBouncer keeps a small pool of server connections and multiplexes many client connections across them, which matters when each application instance or serverless worker would otherwise open its own. Pool mode determines which session features, such as session-level settings and prepared statements, remain safe, so the application team must agree on the mode before deployment. PgBouncer 1.26.1 was released on October 14, 2026 with security fixes, so track its release notes and schedule the upgrade as part of routine patching.

PgBouncer site

SCRAM and OAuth 2.0 authentication

SCRAM is the password method to use, and PostgreSQL 18 deprecated MD5 password authentication in its favor, so older client drivers and connection poolers must be checked for SCRAM support. PostgreSQL 18 also added an OAuth 2.0 authentication method, which lets database logins rely on the identity provider used by the product rather than separate database passwords. Confirm which roles get which method, how service accounts are provisioned and how access is revoked when an engineer leaves.

Authentication methods docs

How the SaaS data path fits together

The path starts at the application services, which connect through PgBouncer to the primary database rather than opening a direct connection for every request. The primary streams changes to hot standby replicas that serve read-only queries, and archives WAL to off-site storage, which is what makes point-in-time recovery possible. An external failover tool watches the primary, because PostgreSQL does not detect a failure or promote a standby on its own. Check each arrow that crosses a trust boundary, and confirm who can reach the backup storage and the failover tool's control plane.

Application traffic, replication, WAL archiving and failover across three trust zones.

When replicas are enough and when Citus changes the design

Most SaaS databases should stay on a single primary with hot standby replicas for longer than teams expect. Replicas serve read-only queries and give you a failover target, but every node still holds the full dataset and every write still goes to one primary. The decision to distribute the database with Citus should be triggered by measured write volume or data size that the primary cannot carry on the hardware you can run, not by a general sense that the platform will grow. Before that point, the work that pays off is clean tenancy keys, row-level security policies that are tested, and a schema migration process that does not assume a single database.

The tenant key is the most consequential choice in a Citus design. Citus distributes tables by a distribution column, and the column you pick should be the tenant identifier that appears in nearly every table and in most queries, such as an account_id or tenant_id. Tables that share that column can be co-located so joins within one tenant stay on one node. Reference tables, such as plan definitions or country codes, are copied to every node. A key chosen only for convenience, or a tenant table that cannot be co-located with its child tables, produces cross-node joins that are slow and hard to reason about. Confirm with the Citus documentation for your version how co-location and reference tables behave before you commit the schema.

Schema changes and cross-tenant queries are where distributed designs most often surprise teams. DDL and migrations run across shards, so a migration tool must be able to apply changes to every node and recover when one fails partway. Unique constraints and foreign keys that do not include the distribution column are restricted, so review them before migration. Internal analytics, billing reconciliation and support tooling that query across all tenants can become expensive fan-out queries. Build a test environment with a realistic tenant distribution, run your full migration history, rehearse the rollback, and measure the cross-tenant reports your business depends on, so the decision to distribute is based on evidence rather than an outage.

What SOC 2 evidence the database must produce

A SOC 2 examination tests whether controls operate as described, so the database has to generate its own proof. The cards below map the security common criteria CC6 to CC9 to the database artifacts an examiner will ask for, and to the points where DeployOpen prepares that evidence while an independent CPA firm decides what the report says.

Logical access grants (CC6)

CC6 covers how access to the system is granted, restricted and removed. For PostgreSQL, the evidence is the role model: which roles exist, which application services and humans hold them, and which privileges each role carries. Keep role definitions in version-controlled SQL or infrastructure code so each grant has an author, a review and a date. Check that application services use separate roles from administrators, and that departing staff lose access in the same change window as their directory account.

Authentication configuration records

The pg_hba.conf file and the server's authentication settings decide which clients can connect and how they prove identity. Store the file under change control and export the effective settings with each review. PostgreSQL documents methods such as SCRAM, certificates, LDAP and OAuth, and an examiner will want to see that weak methods are not allowed for production networks. Record who approved each rule that opens a new source address.

Authentication methods docs

Audit logs of database activity

CC7 asks whether the organization detects and investigates anomalous activity. Database logs should record connections, failed logins, privilege changes and administrative statements, and they must leave the database host so an administrator cannot quietly edit them. Test that a sample of logins and a role change appear in the central log store, and define who reviews the log and how often. Ask your team which events are logged today and which are not before the examiner asks.

Backup and restore test records

Backups support the availability and recovery commitments in CC7 and the availability category when it is in scope. A backup job log proves a copy exists, but only a dated restore test proves it works. Keep a record of each restore: the backup used, the target time, the database version, who ran it, and the outcome. Point-in-time recovery depends on archived WAL files, so the evidence should also show that archiving has no gaps over the period.

Continuous archiving docs

Upgrade and change tickets

CC8 covers change management, so every schema change, configuration change and version upgrade needs a traceable request, approval, test and rollback plan. For PostgreSQL, a minor update replaces executables and restarts the server, and a major upgrade follows a planned method such as pg_upgrade or logical replication. Each change ticket should link to the test run and to the post-change verification. Confirm with your team which versions are still supported during the audit period, since unsupported versions create findings of their own.

Risk and vendor responsibility records

CC9 asks how the organization identifies and mitigates risks, including risks from vendors and open-source components. For a self-hosted database, the risk register should name the database as a system component, list the open-source dependencies such as the connection pooler and extensions, and record how security updates are tracked. Examiners often ask who owns each risk and how the register is reviewed. Confirm that your risk owner and review cadence are written down before the examination window opens.

SOC 2 Type 1 versus Type 2 for a database-backed product

What does a SOC 2 Type 1 report cover?

A SOC 2 Type 1 report covers the system description and the suitability of control design as of a single date. The auditor checks whether the controls, as written, would address the relevant Trust Services Criteria, but does not test whether they worked over time. For a database-backed product, the system description should name the PostgreSQL clusters, replicas, backup stores, bastion access paths, secrets handling and the people who administer them. Ask your auditor which points of focus they expect you to address, since not every point of focus must be covered. A Type 1 is often used as a first milestone, because it shows that the design exists before an observation period begins.

What does a SOC 2 Type 2 add over a period?

A SOC 2 Type 2 report adds an opinion on operating effectiveness across an observation period, so the auditor samples evidence that controls operated consistently throughout that window. For a PostgreSQL platform, this means dated evidence of access reviews for database roles, change tickets for schema and configuration changes, restore test records, backup job logs and alert response records. The period length is agreed with the auditor and your buyers, and the evidence must exist for the whole period. Controls that were designed but never run consistently will show as exceptions. Plan the evidence collection before the period starts, not at the end.

Why is SOC 2 report use restricted while SOC 3 is general use?

SOC 2 report use is generally restricted because the report contains detailed descriptions of your controls, system components and test results, which are meant for existing customers, prospects under agreement, and their auditors. A SOC 3 report covers the same Trust Services categories in less detail and is designed as a general use report that can be freely distributed, often published on a website. Many sales teams publish a SOC 3 for early prospects and share the SOC 2 under a non-disclosure agreement. Confirm with your auditor which distribution rules apply to your engagement, and check your customer contracts for any specific obligations on sharing audit reports.

Which Trust Services categories should a database-backed SaaS include beyond security?

Security is the only category that is always in scope, through the common criteria CC1 to CC9. The other four categories are added only when they match your service commitments: availability, processing integrity, confidentiality and privacy. For a database-backed product, availability usually matters when customers depend on uptime and recovery, which brings in backup, replication and restore evidence. Confidentiality fits when customers send you data marked confidential. Privacy adds criteria when you handle personal information under defined notice and consent terms. Processing integrity fits when data accuracy drives customer outputs such as billing. Decide the categories from your commitments and customer requirements, and document the reasoning for your auditor.

How could the proposed attestation standard changes affect planning?

The AICPA Auditing Standards Board exposed proposed revisions to its baseline attestation standards in February 2026. If adopted, these revisions would apply to engagements beginning on or after June 15, 2029. Because the proposal is not final, the practical step is to watch for the final standard and ask your audit firm how it would affect your report period and evidence requirements. For planning, a SOC 2 cycle that starts before that date should be designed around the current standards, while the evidence model stays reusable. Keeping access reviews, change records and restore tests in a system you control makes any future change easier to absorb. Confirm the timing and effects with your auditor rather than assuming them.

Can DeployOpen issue a SOC 2 report for our PostgreSQL platform?

No. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. A licensed CPA firm performs the SOC 2 examination and issues the report. DeployOpen can help define the PostgreSQL controls, configure access management and audit logging, set up backup and restore testing, and organize the evidence your auditor will request. Scope, deliverables and timelines are agreed in writing before work starts, and the quote follows from that scope. Ask your audit firm early which evidence formats they accept, so the platform work produces what the examination needs.

What should we ask our auditor before choosing report type and period?

Ask which Trust Services categories they expect for your service, which points of focus they will test, how long the observation period should be, and what evidence samples look like for database access, backups and changes. Ask whether they will accept system-generated logs or require screenshots, and how they treat controls run by a third-party hosting provider. Ask about fees for each report type and what drives them, such as system complexity, number of locations and sample size, and request a written estimate. Ask about the timeline from readiness assessment to report issuance. Record the answers, since they shape the PostgreSQL evidence design.

Rollout from design to first SOC 2 observation period

The sequence moves a SaaS database from tenancy design to a restore-tested cluster with row-level security and collected evidence, so the observation window starts with controls that already work and can be shown to an auditor.

  1. Scope the tenancy model and data classes

    Decide how tenants are separated (shared schema with a tenant column, schema per tenant, or database per tenant), then classify the data each table holds, such as customer content, personal data, credentials and operational logs. The product owner, the engineering lead and the security lead approve the written decision. The output is a tenancy design note and a data classification table that names which systems hold each class. Done means every table in the initial schema maps to a class and a tenancy pattern.

  2. Build the cluster with replication and backups

    The platform team builds the primary and standby servers in the infrastructure you control, configures streaming replication and chooses between synchronous and asynchronous commit based on the recovery targets set by the business owner. Continuous archiving of WAL files and base backups is configured to a separate storage location. Failover tooling is selected and documented, since PostgreSQL does not detect a failed primary by itself. The output is a running cluster diagram, the replication settings and a backup configuration that the platform lead signs off.

  3. Run a point-in-time recovery drill

    Before any production data is treated as protected, the operations team restores a base backup and replays archived WAL to a chosen point in time on separate hardware. They compare row counts and a set of checksum queries against the source. Any gap in archived WAL or missing backup is logged as a defect and fixed before the drill is repeated. The output is a dated drill record with the target time, the measured restore duration and the sign-off from the operations lead. This comes early so later evidence describes a backup that has already worked.

  4. Configure row-level security and authentication

    Engineers enable row-level security on tenant-scoped tables, write policies keyed to a tenant identifier set per session, and confirm that application roles cannot bypass them. Authentication is set in pg_hba.conf with SCRAM for password logins, TLS for client connections and certificate or directory-based access for administrators. Application connection pooling is placed in front of the database if needed. The output is the policy catalog, the access configuration and a cross-tenant test suite that fails the build if one tenant reads another's rows. The security lead approves the test results.

  5. Instrument evidence collection

    Set up the logging, change tracking and access records the auditor will ask for: database audit logs for privileged actions, a record of role and policy changes kept in version control, alerts on failed logins and backup job failures, and a quarterly access review export. Decide where each record is stored, who can read it and how long it is kept. The output is an evidence map that links each control in your system description to a named artifact, owner and collection method. The compliance lead approves the map before the observation period begins.

  6. Repeat the restore drill against the controlled baseline

    With logging, access and policies in place, the operations team runs the restore drill again on the production configuration and records that the restored database also enforces row-level security and carries the expected roles. This confirms that controls survive a recovery, which auditors often test. Any divergence between the drill environment and production is documented with its owner and resolution. The output is a second drill record and a configuration baseline snapshot. The engineering lead and compliance lead approve it together.

  7. Start the observation window with a frozen baseline

    Freeze the system description, the control owners and the evidence map as the baseline for the period under examination. Confirm with your SOC 2 auditor, before the window opens, which report type is planned and how the observation period will be defined, since a Type 2 report covers operating effectiveness over a period while a Type 1 covers design as of a date. The output is a signed baseline record, a kickoff note with the auditor and an evidence calendar. Changes to controls after this point are tracked as change requests against the baseline.

The cost of self-hosting versus a managed service

Self-hosting PostgreSQL removes the license fee, but the database still costs money in infrastructure, people and evidence work. These cards separate the one-time setup costs from the recurring ones so you can compare a self-hosted cluster with a managed service on the same scope.

Software licensing

PostgreSQL carries no license fee. It is released under the PostgreSQL License, a liberal open source license similar to the BSD or MIT licenses, so the cost question moves to everything around the database. Check whether any extensions, operators, monitoring products or commercial support contracts you plan to add carry their own license terms, because those costs do not disappear when the core database is free.

PostgreSQL licence

Infrastructure and capacity

You pay for compute, storage, network and backup capacity in your own cloud account or data center, and for the standby servers that high availability requires. Costs rise with replica count, storage growth from retention, cross-region copies and peak connection load. Ask any managed-service quote to state the instance size, storage, replica count and backup retention it assumes, so the comparison uses the same inputs.

Staff time for upgrades and on-call

This is the largest recurring cost for most teams. Minor releases arrive at least once every three months and need executable replacement and a restart, while each major version is supported for five years, so a major upgrade cycle repeats on a predictable schedule. Add on-call coverage for failover, disk pressure and connection incidents. Ask a partner to price these as a recurring retainer or as named upgrade projects, and to state who holds the pager.

Support per major version
5 years
Versioning policy

Backup tooling and restore testing

Point-in-time recovery needs a base backup, archived WAL files and a tool to move both off the primary server. Tooling is usually open source, so the cost is the engineering to configure it, the off-site storage, and the recurring restore tests that prove the chain works. Ask a quote to include a restore drill schedule, the recovery time and recovery point targets it is built to meet, and who runs the drill.

Continuous archiving docs

External failover and connection tooling

PostgreSQL does not detect a failed primary or promote a standby on its own, so automatic failover depends on external software, and most SaaS platforms also need a connection pooler such as PgBouncer in front of the database. Both are open source, but each needs design, testing, patching and monitoring. Confirm that the quote covers failover testing, pooler upgrades and the handling of security releases, not only the initial install.

Failover docs

Compliance evidence work

A SOC 2 examination asks for evidence that controls operated over a period, such as access reviews, change records, backup restore results and logged database administration. A managed provider supplies some of this under its own report, but the report does not cover your controls on top of its service. Self-hosting shifts that evidence work to your team, so ask any quote to state which evidence it produces and whether it is prepared for your auditor.

Keeping a clean exit under the EU Data Act

The EU Data Act, Regulation (EU) 2023/2854, requires data processing service providers to let customers switch to another provider or to on-premises ICT infrastructure, with a maximum two-month notice period and a 30-day transitional period. From 12 January 2027, providers may not impose switching charges at all, and until then reduced charges may not exceed the costs directly linked to switching. For a SaaS company, the practical question is whether its own database can be moved out without the provider's cooperation. Self-hosting on infrastructure you control makes that question easier to answer, because the schema, data and tooling are already yours.

If your team runs PostgreSQL itself, keep the portability artifacts in version control and test them. Store DDL as migrations (for example, the output of pg_dump --schema-only), keep row-level security policies, roles, extensions and tenancy functions defined in those migrations rather than applied by hand, and take logical dumps on a schedule that you restore into a clean instance. Record the exact PostgreSQL major version and the extensions in use, since an exit target may run a different version. A restore into a fresh server, followed by a row count and checksum comparison per tenant, is the evidence that the exit path works. Plan this as a recurring check, not a document that is written once.

If a managed provider hosts the database, ask in writing how a full export is delivered, in what format, at what size limits and within what time, and whether schema, roles, policies and extensions are included or only table data. Confirm the notice period and transitional period in the contract, and whether any exit charges apply before 12 January 2027. Ask how the provider handles logical replication or backup access during the transition, and whether you can run a trial restore of an export outside their environment. The answers determine whether your exit is a planned migration or a rebuild under pressure.

Questions SaaS teams ask before hiring help with PostgreSQL

What drives the cost of implementing PostgreSQL for a SaaS product?

Scope drives cost more than the software, which is free under the PostgreSQL License. The main cost components are design work (tenancy model, schema, access model), build work (replication, backups, connection pooling, monitoring), verification (restore tests, failover tests, load tests) and handover documentation. Some costs are one-time, such as the build and initial testing. Others recur, such as infrastructure, monitoring, patching, minor-release updates and on-call time. Ask any quote to separate these lines and to state who pays for each: your cloud or data center bill, your staff time and the partner's fixed-scope fee.

How long does a PostgreSQL build take for a SaaS team?

Duration depends on how many components are in scope and how much of the design is already settled. A single primary with backups and pooling is a smaller job than a multi-region setup with synchronous replication, automated failover, Citus sharding and tested recovery. Duration also depends on how quickly your team can approve access, provide cloud accounts, and decide on tenancy and retention questions. No fixed duration applies to every product, so ask for a written schedule tied to the agreed deliverables before work starts.

What does the internal team need to provide during the engagement?

Your team needs to supply the environment and the decisions. In practice this means:

  • Cloud or data center accounts, network ranges and approved instance types
  • An owner for the tenancy model, row-level security rules and data retention policy
  • Access to your identity provider, secrets store and monitoring tools
  • Staff available to review designs, run restore drills and take over operations

Without a named owner for these items, most schedule slips come from waiting on decisions rather than from the database work itself.

Can a small engineering team run PostgreSQL high availability on its own?

Yes, many teams do, provided they accept the operating work. PostgreSQL provides streaming replication, synchronous and asynchronous modes, and hot standby, but it does not detect a failed primary or promote a standby by itself, so you need external failover tooling and a tested runbook. Backups need archived WAL files, a base backup schedule and regular restore tests. Assess whether your team can staff on-call coverage, patch minor releases at least once every three months, and rehearse failover. If those gaps exist, a fixed-scope build with documentation and a retainer can cover them.

How should a SaaS team plan an upgrade to PostgreSQL 17 or 18?

Start from the supported dates. PostgreSQL 14 is supported to November 12, 2026, 15 to November 11, 2027, 16 to November 9, 2028, 17 to November 8, 2029 and 18 to November 14, 2030. Choose the target version against those dates and your release calendar. For the move itself, compare pg_upgrade with logical replication. Logical replication works across major versions and can keep downtime to several seconds, but it needs careful handling of sequences, schema changes and replication slots. pg_upgrade retains planner statistics in PostgreSQL 18 and supports parallel jobs, which shortens the window for many clusters. Rehearse the chosen path on a copy of production data and confirm application compatibility before cutover.

What does a managed PostgreSQL service still leave to the customer?

A managed service typically handles the server host, some patching and often automated backups. It usually does not design your schema, tenancy model or row-level security policies, and it does not decide who may read which tenant's rows. You still own query and index performance, connection budgets, application-level authorization, retention rules, restore testing against your recovery targets, and evidence for SOC 2 criteria such as access reviews and change management. Check each provider's shared responsibility documentation, and confirm what it logs and how long logs are kept before you rely on it for audit evidence.

What SOC 2 evidence does a self-hosted PostgreSQL database produce?

A SOC 2 examination reviews controls against the AICPA 2017 Trust Services Criteria, and the security common criteria CC1 to CC9 apply to every SOC 2. For the database, auditors typically look for documented access control (CC6), change management for schema and configuration changes (CC8), monitoring and logging (CC7), and tested backup and recovery tied to availability commitments. DeployOpen prepares systems, controls and evidence for these reviews, but it does not issue audit reports. A Type 1 report covers control design at a date, while a Type 2 report tests operating effectiveness over a period, so ask your auditor which type you need and how long the observation window will be.

Can DeployOpen help us prepare for a SOC 2 audit without guaranteeing the outcome?

Yes. DeployOpen can plan and build the PostgreSQL environment in your infrastructure, document configuration, configure logging and access controls, and prepare the evidence your auditor will request. It also runs security testing of the application and its APIs. It does not issue SOC 2 reports, attestations or certifications, and the audit result depends on your controls operating over time, which only your team and an independent CPA firm can establish. Agree the evidence list and the scope of the controls in writing before work starts.

How DeployOpen scopes and delivers SaaS PostgreSQL work

DeployOpen plans, implements, hardens, documents and supports self-hosted PostgreSQL inside your own cloud accounts, data centers or air-gapped networks. For SaaS and technology companies, the work starts with the tenancy model and the evidence your customers and auditors will ask for, then moves through a written scope, a tested build and a handover your team can run.

How we scope

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • We map tenancy model, data isolation needs and row-level security requirements against your current application code.
  • Scope sets which SOC 2 control areas your PostgreSQL platform must evidence, so the auditor's requests are planned up front.
  • The written scope states which replicas, Citus decisions and managed-service comparisons are included, and which are excluded.

How we build

  • Build covers PostgreSQL configuration, replication, connection pooling with PgBouncer and backup tooling in your infrastructure.
  • Row-level security policies and role design are implemented and tested against real tenant boundaries in a staging copy.
  • Point-in-time recovery is configured with archived WAL and then restored in a test environment to prove it works.
  • Access is wired to your identity provider through the authentication methods PostgreSQL supports, with audit logging enabled.

How we hand over

  • Handover includes runbooks for failover, restore, major upgrades and connection pool changes, written for your own operators.
  • Configuration, access model and tenancy decisions are documented so an auditor can trace each control to its evidence.
  • Your team receives a restore test record and a list of open items, with owners agreed in the written scope.
  • We walk your engineers through the platform and agree which operational tasks they will own from day one.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, scoped separately from the build.
  • Retainers can cover planned minor updates, major version upgrade planning and periodic restore tests.
  • Ask any provider which SOC 2 evidence they will refresh each period and who in your team receives it.

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.