PostgreSQL for government and public sector

Agencies that need open licensing, sovereign hosting and auditable controls can run PostgreSQL in their own infrastructure. This page covers what the build, compliance evidence and handover involve.

On this page

Why PostgreSQL fits government PostgreSQL deployments

An agency that is replacing a commercial database usually starts with a contract problem: a license renewal that keeps growing, a vendor whose terms limit where the database can run, or a system holding controlled data that must stay inside a network the agency operates. PostgreSQL is released under the PostgreSQL License, a liberal open source license similar to the BSD and MIT licenses. That gives procurement a simpler question to answer: the agency pays for implementation, hosting, support and staff time, not a per-core or per-instance database license. The license text itself should still go through the agency's counsel, and any third-party extensions, backup tools or management software chosen for the stack need their own license review.

The support window is the second fact procurement and security teams will ask about. PostgreSQL ships a new major version about once a year, issues minor releases at least once every three months, and supports each major version for five years after its initial release. The current supported versions are 18 (final release November 14, 2030), 17 (to November 8, 2029), 16 (to November 9, 2028), 15 (to November 11, 2027) and 14 (to November 12, 2026). Versions 13 and earlier are unsupported. An agency should map each database it plans to run against these dates and write the upgrade cycle into its operating plan from the start, since an unsupported database is hard to justify in an assessment.

Hosting in the agency's own infrastructure changes how the build is designed. Minor releases replace executables and require a restart, while major upgrades need a planned path using pg_upgrade, dump and restore, or logical replication, which can work between major versions with only several seconds of downtime. Those choices depend on whether the environment has internet access, so the agency should confirm early how packages, container images and extensions will reach an isolated network, and how each one will be verified before it crosses the boundary. Ask the implementation partner to document that transfer path as part of the scope, not as an afterthought.

Which government requirements shape the database build

This table maps five government requirements to what each one means for PostgreSQL TLS, key lengths, backups, logging and hosting choices. Read each row as a question to put to your assessor or compliance lead before the design is fixed. The main takeaway is that most of these rules apply to the data and the system around PostgreSQL, so the database design has to match the authorization boundary, not just the software.

RequirementWhat it asks forWhat it means for the PostgreSQL build
NIST SP 800-53 baselines and FISMA oversightFederal agencies select low, moderate or high baselines from SP 800-53B (149, 287 and 370 controls and enhancements respectively, per Release 5.2.0), and Inspectors General assess the results under FISMA.Confirm the impact level of the data first, then map each control to a PostgreSQL setting, log destination or runbook. Keep evidence of configuration, access reviews and backup tests, since an independent assessor will ask for it.
CJIS Security Policy v6.1 encryption and scanningFor criminal justice information outside physically secure locations, use FIPS 140-3 validated modules or FIPS 197 AES with at least 256-bit keys in transit and at rest; scan for vulnerabilities at least monthly.Require TLS for every client and replication connection, with cryptographic modules and key lengths your assessor accepts. Encrypt backups and WAL archives at the same strength, and schedule monthly scans that cover the PostgreSQL host, its packages and the backup store.
32 CFR 2002.14(h)(2) for CUI on non-federal systemsAgencies set protection requirements for controlled unclassified information on non-federal systems using NIST SP 800-171, unless the CUI category sets other safeguards.When a contractor or vendor runs PostgreSQL holding CUI, the requirements flow down to that host. Document who administers the database, how access is granted and reviewed, and how audit records of access are retained.
CMMC Level 2 cloud conditions under 32 CFR 170.17(c)(5)A defense contractor may store or process CUI in a cloud service only if it is FedRAMP Authorized at the Moderate baseline or higher, or meets equivalent requirements. Non-cloud providers are assessed within the contractor's own scope.Decide where the database runs before the schema is designed. A self-hosted PostgreSQL cluster in your own data center keeps the database within your assessed scope, while a managed service in a cloud brings a FedRAMP question into the design. Confirm the boundary with your assessor.
ADA Title II accessibility deadlines for public-facing appsState and local government web content and mobile apps, including those provided through contracts or licenses, must meet WCAG 2.1 Level A and AA from 26 April 2027 for entities serving 50,000 or more people, and from 26 April 2028 for smaller entities and special districts.The database is not the accessibility control, but the application it serves is. Confirm with your application team that query-driven pages, forms and exports meet the deadline that applies to your entity, and keep the database schema stable enough for that testing to hold.

How sovereign and air-gapped hosting changes PostgreSQL operations

In an isolated network, the database team cannot pull packages from public repositories during a patch window, so every PostgreSQL binary, extension, failover tool and backup utility has to be sourced, verified and tested offline before it reaches production. Start by building an inventory of what the cluster needs: the server packages for your chosen major version, client tools, the connection pooler, the failover manager, the backup tool and any operating system dependencies. Each item needs a version, a checksum and an owner. Minor releases arrive at least once every three months under the PostgreSQL versioning policy, so plan a recurring transfer cycle that carries each minor update across the boundary, not an occasional one. Minor updates replace executables and restart the server without changing the storage format, which keeps the offline step small, but the transfer and verification steps are still yours to run and evidence.

Verification is where the comparable control matters. NERC CIP-013-2 requires supply chain procurement processes to address verification of software integrity and authenticity of vendor software and patches. Public sector teams without an energy background can apply the same logic: record the source, hash and signature check for every package, keep a manifest with each import, and require a second person to approve it before it crosses the boundary. Confirm with your security team which standard their assessors will test against, and whether the accreditation boundary includes the import workstation and the media used to carry files.

Automatic failover and point-in-time recovery are not built into PostgreSQL. PostgreSQL does not provide the software to detect a primary failure and notify the standby, so an external failover tool must be sourced, installed and rehearsed offline, along with the archive tooling that moves WAL files and base backups. Test the whole chain inside the isolated network: a forced primary failure, the promotion decision, client reconnection through the pooler, and a restore from archived WAL to a named point in time. Hosting in a cloud outside the agency also raises a scope question. FedRAMP's scope under M-24-15 covers cloud services that store or process federal information on behalf of an agency, so confirm early with your authorizing official whether a commercial cloud region used for database hosting falls in scope, and document the answer.

Choosing a hosting model for agency data

Agency-owned data centers keep the trust boundary inside the agency's own facilities, racks, network and identity systems. Agency staff, or a contractor working through agency-controlled access paths, operate the database, take backups and apply patches. The evidence assessors ask for is largely physical and administrative: facility access records, network diagrams, change tickets and restore test results.

  • Trust boundary: the agency's facility, hypervisors, network segments and directory. Database superuser and operating system root accounts sit inside the agency's identity process and should be logged and reviewed.
  • Backups and patching: agency staff run base backups and WAL archiving to a second site the agency controls. PostgreSQL minor releases arrive at least once every three months and require replacing executables and restarting, so the patch calendar needs named owners.
  • Failover: PostgreSQL does not detect a failed primary or notify a standby. The agency must choose, operate and test an external failover tool.
  • Control baseline: the system security plan selects controls from the SP 800-53B baselines. Low, moderate and high baselines select 149, 287 and 370 controls and enhancements respectively.
  • Evidence: asset inventory, configuration baselines, monthly vulnerability scan results where criminal justice information is stored (control RA-5), and records of completed restore tests.

Confirm who holds privileged access during an outage and whether that access is recorded and reviewed afterward.

Configuration that matters for public sector PostgreSQL

Public sector reviewers usually ask the same questions of a database: who can log in and how, how data is protected in transit and at rest, whether records survive a failed server, and whether anyone can prove who changed what. The cards below cover the settings that answer those questions, and each one needs to be confirmed against your own directory, network and retention rules.

Authentication methods and password hashing

Set password_encryption to scram-sha-256 and retire MD5 password authentication, which PostgreSQL 18 has deprecated in favor of SCRAM. Where the agency already runs a directory, decide whether logins go through LDAP, GSSAPI, SSPI, certificates or OAuth 2.0, based on what your identity platform supports. Check pg_hba.conf in review so that every rule names the method, the source network and the database it applies to.

Authentication methods docs

TLS and encryption key strength

Require TLS for every client and replication connection, and confirm that certificates chain to an authority the agency trusts. For CJI or other sensitive data, the CJIS Security Policy v6.1 expects FIPS 140-3 validated modules or AES with at least 256-bit keys for data at rest and in transit outside physically secure locations. Ask your storage or volume vendor which encryption modules and key sizes they use, because PostgreSQL itself does not manage those keys.

Synchronous replication for records that cannot be lost

Synchronous replication makes a commit wait until a standby confirms it, which protects records that an agency cannot afford to lose. The trade-off is write latency and availability: if no standby acknowledges, writes stall. Name the standbys that must confirm, test what happens when one is unreachable, and pair this with an external failover tool, because PostgreSQL does not detect a primary failure on its own.

High availability docs

Point-in-time recovery with off-site WAL archives

Point-in-time recovery needs a base backup plus archived WAL files, so the archive is what makes recovery to a chosen moment possible. Store the WAL archive in a location separate from the primary, in a jurisdiction your data rules allow, and restrict who can delete from it. Schedule restore tests that rebuild the database from the archive, because an archive that has never been restored is not yet proof of recovery.

Continuous archiving docs

Connection control with PgBouncer 1.26.1

PgBouncer limits how many client connections reach PostgreSQL, which protects shared government systems from connection floods and runaway applications. Version 1.26.1, released October 14, 2026, carries security fixes, so confirm your deployed build is at or after that release before go-live. Review the pooling mode and the user list that PgBouncer uses to authenticate clients, since that list must follow the same SCRAM and directory rules as the database itself.

PgBouncer project site

Audit logging with named roles

Audit trails need two controls: logs that record connections, privilege changes and significant statements, and access that limits who can read or alter those logs. Grant database access through named roles tied to individual accounts instead of shared logins, and keep the audit role separate from administrators whose actions it records. Confirm with your auditor which events must be captured and how long logs must be kept, since those retention periods come from your own policy.

How a government PostgreSQL rollout moves from scope to handover

The sequence turns an agency's authority and control obligations into a built, tested and documented PostgreSQL service that the agency can review, operate and hand over. Each step closes with an artifact the agency can check before the next step starts.

  1. Agree written scope and map authorities

    DeployOpen and the agency record the systems in scope, the data types they hold, the hosting boundary and the authorities that apply, such as FISMA-driven agency controls, CJIS Security Policy for criminal justice information, or NIST SP 800-171 requirements for controlled unclassified information where they reach the database. The agency's authorizing official and independent assessors make the decisions on which baseline applies and issue any authorization. The step closes with a signed scope document and a control mapping that names which requirements each design choice must satisfy.

  2. Prepare environment and offline packages

    The team confirms the target infrastructure, network segmentation and access paths, then assembles the PostgreSQL packages, extensions, operating system updates and tooling needed for a disconnected build. Every artifact is pulled from an approved source, recorded with its version and checksum, and moved across the boundary under the agency's transfer procedure. Where the agency needs to verify software integrity and authenticity for vendor software and patches, this is the point where those checks are run and logged. The step closes with a bill of materials and a transfer record that the agency can review.

  3. Build and harden the cluster

    The team installs PostgreSQL on the agency's servers or containers, configures authentication through the directory and certificate methods the agency requires, and applies TLS, least-privilege roles and file permissions. Replication, connection pooling and failover tooling are configured to the agreed availability design, with the external failover tool chosen and tested because PostgreSQL does not detect primary failure on its own. The step closes with a hardening checklist mapped to the agreed control set and a test report showing that failover and access rules behave as designed.

  4. Prove backup and restore

    The team sets up continuous archiving with a base backup and archived write-ahead log files, and configures incremental backups where the design calls for them. Backups are copied to the storage location the agency approves, and encryption keys are handled under the agency's key management rules. A restore is then performed into a separate environment, and point-in-time recovery is tested to a chosen moment to confirm the result matches expectations. The step closes with a restore record that states what was restored, to what point, how long the agency's team observed the process, and any gaps still open.

  5. Collect control evidence

    The team gathers the configuration exports, access lists, logging settings, scan results, patch records, backup logs and test outputs that map to each agreed control. Evidence is organized by control identifier so the agency's assessors can trace each requirement to a specific artifact without reconstructing the design from memory. Gaps are recorded with an owner and a proposed fix, and the agency decides whether to accept any gap. DeployOpen prepares this evidence but does not issue audit reports, attestations or certifications. The step closes with an evidence index the agency can hand to its assessors.

  6. Hand over with runbooks and training

    The team delivers runbooks for routine operations, minor and major version updates, failover, backup restore, access changes and incident response, along with the architecture record and the configuration baseline. Agency staff perform a walkthrough of the restore and failover procedures on the handed-over system so that ownership is tested, not assumed. Ongoing support, upgrades and continuous testing can be scoped separately as a retainer if the agency wants them. The step closes with a signed handover record listing the owners of each runbook and the open items the agency will track.

Compliance evidence agencies ask the database team for

Assessors and Inspectors General rarely accept a database on its own. They ask how the PostgreSQL cluster maps to the controls in the agency's baseline, how data at rest and in transit is protected, where controlled information may sit, and whether the application is accessible. DeployOpen prepares the systems, controls and evidence for these reviews. It does not issue audit reports, attestations or certifications, which remain with the agency's assessors and certifying bodies.

Control mapping to SP 800-53 baselines

Map each database control to the control identifiers in the agency's chosen baseline, such as the low, moderate or high profile from SP 800-53B. Typical rows cover account management, audit records, configuration settings and backup. Confirm which baseline your system categorization selects, because the number of controls and enhancements grows with each level. Keep the mapping in version control so it changes with the cluster.

High baseline controls
370
SP 800-53B baselines

CJIS encryption evidence

For criminal justice information, the CJIS Security Policy requires FIPS 140-3 certified modules or AES with 256-bit keys outside physically secure locations. Record the TLS versions, cipher suites and the cryptographic module used for PostgreSQL connections and for encrypted backups. Ask your assessor which encryption-at-rest mechanism satisfies the requirement for your storage design.

Monthly vulnerability scanning records

The CJIS Security Policy version 6.1 expects vulnerability scanning at least monthly. Keep scan schedules, scanner configuration, findings, and dated remediation tickets for the PostgreSQL host operating system, the database binaries and the pooler. Track which minor release each cluster runs, since minor releases are the normal path for security fixes and are published at least once every three months.

Minimum scan frequency
Monthly

CUI boundary documentation

Where controlled unclassified information is stored on a non-federal system, NIST SP 800-171 defines the safeguards. Document which databases hold CUI, which hosts, backup targets and administrator workstations are inside the boundary, and how replicas and log shipping are kept within it. If a cloud service is involved, confirm its authorization level with the agency or the prime contractor before any data is placed there.

32 CFR Part 2002

Accessibility for PostgreSQL-backed web applications

Public web content and mobile apps delivered under government contracts must meet WCAG 2.1 Level A and AA under the ADA Title II rule. The database team does not write the interface, but it supplies evidence the front-end team needs, such as stable data exports, audit trails for published content and test data that exercises assistive-technology paths. Confirm the compliance date that applies to your entity size with counsel.

28 CFR Part 35 Subpart H

Inputs an Inspector General or assessor requests

Expect requests for the system security plan, the cluster architecture diagram, account and role listings, pg_hba.conf and TLS settings, audit log samples, restore test records and change tickets for upgrades. Under FISMA, Inspectors General assess agency system security independently. Prepare these inputs before the assessment window opens, and agree in the written scope which evidence DeployOpen produces and which the agency retains.

Replacing a commercial database without losing control of the data

The procurement case for PostgreSQL rests on licence terms the agency can read once and keep. PostgreSQL is released under the PostgreSQL License, a liberal open source license similar to the BSD or MIT licenses, so the agency does not pay per core or per instance to run it, and no vendor can withdraw the right to run the software it already holds. Procurement should still record what the agency is actually buying: the database software is free, while the work to plan, migrate, harden, back up and support it is a services contract or an internal cost. Ask for those costs as separate line items, and confirm which extensions, management tools and support subscriptions the agency intends to use, because their licences are not always the same as the core database's.

Migration planning should start with an inventory of what the commercial database does for the agency, not only the tables it holds. List the stored procedures, scheduled jobs, reporting connections, audit settings, encryption configuration and vendor-specific features that applications depend on, and map each one to a PostgreSQL equivalent or to a change in the application. Set the target major version using the supported release table in the PostgreSQL versioning policy, and confirm the end-of-support date for that version against the agency's own accreditation and upgrade calendar. Agree the cutover approach early, since it determines downtime, rollback options and how much parallel running the agency must pay for. Migration tooling for specific source databases is covered on separate pages.

Exit and data-portability terms matter most when the agency buys a hosted or managed data processing service rather than running PostgreSQL on its own servers. Where that is the case, the EU Data Act (Regulation (EU) 2023/2854), applicable since 12 September 2025, gives customers a right to switch to another provider or to on-premises infrastructure, with a maximum two-month notice period and a 30-day transition, and bans switching charges from 12 January 2027 (Articles 25, 29 and 50). Outside the EU, the agency should write equivalent terms into the contract: export formats, export timelines, deletion certification and assistance during transition. Where DeployOpen runs the platform inside the agency's own infrastructure, the agency keeps the backups, keys and credentials directly, and the exit plan becomes a tested restore onto another host, which the agency should rehearse before it signs.

How the agency PostgreSQL cluster fits its trust boundaries

The diagram starts with application servers inside the agency enclave, which connect through a PgBouncer tier to the primary. The primary sends WAL to a synchronous standby that must confirm each commit, and to an asynchronous replica used for reads and recovery. Backups flow out to an off-site WAL archive, which sits outside the enclave boundary. Packages reach the isolated network only through an offline package repository. Check that every edge that crosses the boundary is one you have approved and documented.

Data and package flows across the agency enclave boundary.

Questions agencies ask before hiring a PostgreSQL partner

What drives the cost of a self-hosted PostgreSQL build for an agency?

The main drivers are the number of environments, how many clusters you run, whether high availability and tested point-in-time recovery are in scope, the connection pooling design, and how much integration work sits around the database. Hosting, licensing for the database itself and staff time are separate lines. PostgreSQL is released under the PostgreSQL License, so there is no per-core or per-seat database fee to budget, but infrastructure, the partner's engagement and your own team's time still cost money. Ask the partner to price each environment, each recovery target and each integration separately so you can see which items you can drop or defer.

Which costs are one-time and which recur after go-live?

One-time costs usually include design, build, migration of data, hardening, documentation and the first restore test. Recurring costs include servers or cloud capacity you run, storage for backups and archived WAL files, monitoring, patching, minor release updates and the staff hours to watch them. PostgreSQL publishes minor releases at least once every three months, so budget for that rhythm every year, not only once. Major upgrades recur about every five years per version, since each major version is supported for five years after its initial release. Ask the quote to separate build fees from any retainer for ongoing support, upgrades and testing.

How long does a PostgreSQL build take, and what changes the schedule?

The duration depends on scope, so no single figure applies to every agency. A single cluster with backups and a documented restore is a much smaller job than a multi-site setup with synchronous replication, automatic failover and integration with your identity provider. Timing also depends on how long your authorization and change approvals take, how quickly environments become available, and whether data migration from a commercial database is included. Ask the partner for a phased plan with dates tied to your environment access and approvals, and for the number of restore tests in the plan.

What must the agency provide before a PostgreSQL project starts?

Most delays come from access, not from the database work. Before the build starts, confirm the following:

  • Environments in your infrastructure, including cloud accounts, data center space or an air-gapped network, with the network paths the cluster needs
  • Directory access for the identity design, such as LDAP, GSSAPI or certificate-based login, with a service account and the group structure for database roles
  • Named approvers for security reviews, change windows, backup retention and cutover decisions
  • Your data classification, recovery point and recovery time targets, and retention rules
  • Named owners for on-call response after handover

Ask the partner to list these items in the written scope so each one has an owner and a due date.

Can our internal team run PostgreSQL alone after handover?

Often yes, if the team has database administration skills and the runbooks are written for them. Running a cluster involves regular tasks: watching replication lag, confirming backups, applying minor releases, and planning major upgrades. Automatic failover also needs an external tool, because PostgreSQL does not detect a failed primary and notify the standby on its own, so your team must own that tool's configuration and tests. Ask for the runbooks, a restore test performed by your staff, and a list of which tasks remain with the partner under a support arrangement. If your team has no PostgreSQL experience, plan training or retained support from the start.

How does a PostgreSQL partner fit into our authorization process?

A partner prepares the system, configuration and evidence, but it does not grant your authorization. Your agency's assessor or authorizing official decides whether the system meets the baseline you are working under. For federal systems, NIST SP 800-53 Rev. 5 is the control catalog, and SP 800-53B defines low, moderate and high baselines with 149, 287 and 370 controls and enhancements respectively. The partner can map configuration to control IDs, document authentication and encryption settings, and produce test results. Confirm early which baseline and which authorization path your system falls under, since a cloud service offered to multiple agencies follows different rules from a system used by one agency on its own infrastructure.

What should we ask for in a written PostgreSQL quote?

Ask for a quote that follows from a written scope, with each item named and priced:

  • Deliverables for each environment, including the high availability design, backup and restore tests, and the connection pooling setup
  • Which components are in scope, such as PgBouncer, an external failover tool, monitoring and identity integration
  • The assumptions about your environments, access and approvals, and what happens if they slip
  • Acceptance criteria, including the restore test and failover test that prove the design works
  • Recurring support terms, minor and major upgrade support, and how changes are billed
  • Who holds security findings, documentation and configuration files at the end of the engagement

DeployOpen's engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts, and ongoing support available as a retainer.

Which PostgreSQL version should an agency standardize on today?

Choose a version that is still in its support window for the whole planned life of the system. PostgreSQL 18 was first released on September 25, 2025 and is supported until November 14, 2030. PostgreSQL 17 is supported until November 8, 2029, and PostgreSQL 16 until November 9, 2028. Version 14 reaches end of support on November 12, 2026, and versions 13 and earlier are unsupported already. Confirm this against the PostgreSQL versioning policy before you approve a design, and schedule the upgrade path for any system whose version will expire during its expected operating life.

How DeployOpen scopes and delivers agency PostgreSQL work

DeployOpen plans, implements, hardens, documents and supports self-hosted PostgreSQL inside the infrastructure your agency controls, including sovereign, classified-adjacent and air-gapped networks. Engagements are fixed-scope, and the written scope sets the deliverables, the evidence your compliance team receives and the handover terms before any build work starts.

How we scope

  • We confirm which systems hold the data, the applicable control baseline and the hosting location before any design work begins.
  • The written scope lists PostgreSQL versions, replication and recovery targets, authentication design, and the evidence your assessors will need.
  • We ask your team to confirm whether a cloud service, shared service or single-agency system applies, since that changes the authorization path.

How we build

  • We install PostgreSQL from packages or images you have vetted, with every artifact checked before it crosses into an isolated network.
  • We configure high availability, pooling, TLS, directory-based login and audit logging to match the controls mapped in the scope.
  • We test point-in-time recovery and failover in your environment and record the results, rather than assuming the design works.

How we hand over

  • You receive configuration, runbooks, architecture notes and a control mapping that your security and compliance staff can review directly.
  • Restore tests, failover tests and upgrade rehearsals are documented with steps, timings you observed and open items for your team.
  • Knowledge transfer sessions cover daily operations, patch intake and the escalation path, so your staff can run the platform without us.

How we support

  • Ongoing support, minor-release patching, major upgrade planning and continuous testing are available as retainers agreed in writing.
  • Support scope covers the PostgreSQL versions named in the agreement, so your team knows which end-of-life dates trigger upgrade work.
  • Changes to the environment, such as new accreditation boundaries or new data types, are handled through a written change to the scope.

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.