PostgreSQL for energy and utilities

Self-hosted PostgreSQL can hold grid, meter and asset data inside infrastructure you control, but NERC CIP and NIS2 shape how it is built, segmented and operated.

On this page

Why PostgreSQL for energy and utilities needs a CIP and NIS2 aware build

PostgreSQL fits the data models energy and utility operators depend on: PostGIS network models for substations, lines and feeders, and time-series tables for meter reads and asset condition. The harder decision is not the engine but the regulatory scope, because that scope decides where the database may sit, who may reach it, how it is monitored and how it recovers. A grid or meter database that supports a BES Cyber System in the United States may fall under NERC CIP, and an operator in the European Union may fall under NIS2 through its national law. Before design starts, confirm with your compliance team which systems are in scope and which impact category applies, because a system classed as high or medium impact carries controls that a corporate reporting database does not.

The PostgreSQL License is a liberal open source license similar to the BSD and MIT licenses, so the software itself adds no license fee to the compliance program, and the cost of running it is the people, infrastructure and evidence work around it. Plan around the supported major versions: 14 (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). An operational database that will run through a CIP audit cycle or a NIS2 supervision period should not start on a version that is near end of life, and the upgrade path should be written into the compliance plan from the first day.

DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. Only the Compliance Enforcement Authority or a national competent authority assesses compliance, and no CIP certificate or NIS2 certificate exists. Ask your auditors and regulators early which evidence they will request for the database, including configuration baselines, access records, change history and restore test results, so the build produces that evidence as a side effect rather than as a last-minute project.

Which energy and utility obligations change the database build

This table maps each energy and utility obligation in the supplied facts to what it asks for and what it means for a self-hosted PostgreSQL build. Scope depends on your registration as a US entity or EU operator and on how your BES Cyber Systems are classified, so confirm those first. Read each row as a question to answer with your compliance team before the database design is fixed.

ObligationWhat it asks forMeaning for the PostgreSQL build
CIP-002-5.1a impact categorizationSorts BES Cyber Systems into high, medium or low impact using bright-line criteriaDecide which databases hold data from high or medium impact systems, since that sets the controls each cluster must meet
CIP-005-7 Electronic Security PerimeterKeeps routable-connected high and medium impact assets inside an Electronic Security Perimeter, with Interactive Remote Access through an encrypted, MFA-protected Intermediate SystemPlace database servers, replicas and pooler hosts inside the perimeter, and route administrator and vendor sessions through the intermediate system only
CIP-013-2 vendor and software integritySupply chain risk management plans covering vendor incident notification, vulnerability disclosure, software integrity verification and vendor remote access, reviewed at least every 15 calendar monthsRecord the source, version and checksum of PostgreSQL packages and extensions, and document how vendor access to the database is coordinated
CIP-012-2 availability of Real-time dataProtects the availability of Real-time data moving between Control Centers, enforceable from 1 July 2026Design replication and failover for Real-time data stores, and test that Control Center data remains available when one site or server fails
CIP-015-1 internal network security monitoringInternal network monitoring, approved by FERC on 26 June 2025 and enforceable from 1 October 2028Plan database network flows, connection logs and monitoring feeds so they can be collected and reviewed for internal network security
NIS2 Annex I energyLists electricity, district heating and cooling, oil, gas and hydrogen as high-criticality subsectors, with national transposition laws setting obligationsConfirm with national counsel whether your entity is essential or important, since this decides supervision intensity for the database estate
NIS2 Article 21 risk managementRequires risk-management measures for in-scope entities, with reporting obligations under Article 23Define backup, access control, patching and incident logging for the database as part of the entity's risk-management measures

Which PostgreSQL modules and settings matter for grid and meter data

Grid and meter data place different demands on PostgreSQL than a typical application: spatial network models, high-volume readings, strict access paths and systems that must keep running. The cards below cover the modules and settings that shape those demands, and the checks to run before a design is fixed.

PostGIS for network models

Network topology, substation locations and line routes are usually held as geometries, so a PostGIS extension is the usual starting point for spatial queries on the asset model. Confirm the extension version against your PostgreSQL major version before the build, and decide early whether the GIS team or the operations team owns the schema. Test the most common spatial queries on production-sized data, because index choice drives whether a map view or an outage analysis responds in time.

PostgreSQL high availability docs

Partitioning meter readings by time

Interval meter readings grow continuously and are queried mostly by time range and meter group. Declarative partitioning by time lets old readings be detached or archived without long deletes, and it keeps recent partitions small for billing and load queries. Confirm how long settlement and dispute windows require readings to stay online, since that retention period, not storage size, sets the partition plan.

Certificate and OAuth or LDAP login

The pg_hba.conf file decides which hosts, users and databases may connect and which authentication method applies. For operational systems, certificate authentication for service accounts and directory-backed login for people are common choices, and PostgreSQL documents both along with OAuth 2.0. Map each application role to a database role, remove password-only rules for remote hosts, and confirm the directory integration with your identity team before go-live.

Authentication methods docs

TLS on every client path

Encrypted connections protect SCADA gateways, historians and reporting tools when they cross network zones. Plan certificate issuance, rotation and the trust chain used by each client, since an expired certificate is a common cause of a sudden outage. Confirm which clients in your environment can verify server certificates and which need configuration changes before enforcement.

Hot standby and synchronous replication

Hot standby servers can serve read-only queries, which suits reporting off the operational path. Synchronous replication makes a commit wait for standbys, trading write latency for less data loss on failure, while asynchronous replication keeps writes fast but can lose recent transactions. Choose per system based on the acceptable loss for each dataset, and test the commit latency under load.

High availability docs

External failover tooling

PostgreSQL does not detect a failed primary or promote a standby on its own, so automatic failover depends on separate software and a tested procedure. Decide who may trigger promotion, how fencing prevents a second primary from accepting writes, and how applications find the new primary. Confirm the failover tool and its settings for your environment before relying on it for operational systems.

Failover docs

PgBouncer pooling and feeds

Many SCADA, historian and GIS connections are short and numerous, so PgBouncer is commonly placed between them and the database to limit server connections. Set pool modes according to the features each client uses, and confirm that the PgBouncer version you deploy includes current security fixes. Integrations with historians and GIS feeds should be tested for connection counts and load timing before production use.

PgBouncer site

How the operational PostgreSQL cluster sits behind trust boundaries

The diagram starts at the remote engineer's workstation, which reaches the control center only through an Intermediate System that enforces encryption and multi-factor authentication, as CIP-005-7 requires for Interactive Remote Access. Inside the Electronic Security Perimeter, operator applications connect through PgBouncer to the primary PostgreSQL server, which streams changes to a standby. Confirm with your compliance team which assets are in scope and how the boundary is documented, because the diagram is a simplified illustration and not a compliance design.

Illustrative trust boundaries for an operational PostgreSQL cluster; not a compliance design.

How a utility rollout moves from impact classification to tested recovery

The sequence turns an uncertain compliance scope into a PostgreSQL platform whose placement, access, availability and recovery each have documented evidence before the operational system depends on it.

  1. Agree scope and impact classification

    The entity's compliance team and the DeployOpen engineers list every system the database will touch, including grid models, meter feeds and historians, and classify each against the CIP-002-5.1a bright-line criteria. The classification decides which CIP requirements apply to the database hosts and which are out of scope. The step closes with a signed scope record that names the BES Cyber Systems, associated EACMS, PACS and PCA, and the compliance owner who approved the classification. Ask your compliance team to confirm the Regional Entity's view before design starts, because the same system can be classified differently depending on its role.

  2. Design architecture and ESP placement

    Architects map where each PostgreSQL primary, standby, pooler and backup target sits relative to the Electronic Security Perimeter required for high and medium impact systems under CIP-005-7. They decide which database traffic crosses the perimeter, how interactive remote access reaches the database through an Intermediate System, and which network segments carry replication and backup traffic. The output is a network diagram with every data flow labeled by source, destination, port and purpose, reviewed by the compliance team. Confirm with your own engineers whether any metering or historian data must be replicated outside the perimeter, since that decision changes the whole layout.

  3. Build with pg_hba and TLS

    Engineers install PostgreSQL from the chosen source, then configure pg_hba.conf so that each role can connect only from approved sources using approved methods. SCRAM is set for password logins, since PostgreSQL 18 deprecates MD5 password authentication, and TLS is enabled for all client and replication connections. Where the organization uses directory login, the team tests the LDAP, GSSAPI or certificate method against its own identity store. The step closes when a test matrix shows each role succeeding from an allowed source, failing from a disallowed one, and rejecting an unencrypted connection, with the results stored as evidence.

  4. Design replication and failover

    The team decides between synchronous and asynchronous replication for each system, based on how much data loss the operator accepts when a primary fails. Synchronous commit adds waiting on standbys, so the decision is tested against the latency of the operational system. Because PostgreSQL does not detect a failed primary or promote a standby by itself, the team selects an external failover tool, defines its health checks and fencing rules, and documents who may trigger a manual promotion. The step closes with a scripted failover test in a non-production environment, recording the observed promotion, client reconnection and any lost transactions.

  5. Prove point-in-time recovery

    Operators set up continuous WAL archiving to storage that is separate from the primary, take base backups on a schedule, and decide whether incremental backups with pg_combinebackup fit the recovery targets. The restore is then rehearsed by rebuilding a cluster to a chosen point in time, checking row counts and application-level reconciliation, and timing the process against the recovery targets the operator has set. The step is complete only when a restore has been performed and written up, not when backups are merely scheduled. Keep the restore record with the compliance evidence, since auditors will ask for proof of recovery, not a backup schedule.

  6. Document vendor supply chain

    Under CIP-013-2, the entity's supply chain risk management plan must cover vendor incident notification, vulnerability disclosure, software integrity verification and vendor-initiated remote access. The team records where each PostgreSQL package, extension and pooler binary comes from, how checksums or signatures are verified, how security releases such as the PgBouncer 1.26.1 fixes are tracked, and how vendor remote access to the database is granted and logged. The output is a supply chain file that the compliance team can attach to its plan, reviewed at least every 15 calendar months under the standard.

  7. Plan cutover and major upgrades

    The team chooses a cutover method for moving data from the current system, either a dump and restore or logical replication, and defines the rollback path before the switch. Major upgrades are planned on the same pattern, using the PostgreSQL support windows to schedule the move to a supported version and testing pg_upgrade or logical replication on a copy of production data. Any change to a BES Cyber System is routed through the entity's change management process. The step closes with an approved cutover runbook, a rollback test, and a dated record of the upgrade path that the compliance team can reference when a version approaches end of support.

What compliance teams will ask for from the database

Compliance teams rarely ask the database team for a certificate, because none exists for CIP or NIS2. They ask what the database does, who can reach it, how changes and copies are controlled, and what records exist to show it. The cards below map the questions most likely to reach the PostgreSQL team to the obligations behind them.

System access and logging controls

CIP-007-6 scopes its system access and security event logging requirements by Applicable Systems, so a PostgreSQL server in scope needs documented account management, least-privilege roles and logs of authentication and privileged activity. Ask which of your database servers are high or medium impact BES Cyber Systems or associated EACMS, PACS or PCA before you design logging. Confirm with your compliance team how long logs must be kept and where they are reviewed, because the database alone cannot answer those questions.

PostgreSQL authentication docs

Information protection and media handling

CIP-011-3 covers protecting BES Cyber System Information, including how it is stored, transported and disposed of. For PostgreSQL, that means deciding which tables hold operational detail such as network models or device configurations, restricting access to them, and setting rules for backups and exported files that contain the same data. Ask the compliance team which data counts as BCSI before you build reporting or replicas that copy it elsewhere.

Supply chain plan and 15-month review

CIP-013-2 requires a supply chain risk management plan covering vendor incident notification, vulnerability disclosure and software integrity verification, and the plan must be reviewed at least every 15 calendar months. For PostgreSQL, the plan should record where packages come from, how signatures or checksums are verified, how minor releases are applied, and how vendor-initiated remote access to the database is coordinated. Keep a dated record of each review.

Plan review interval
15 months
CIP-013-2 standard text

Incident response and reporting duties

NIS2 Article 23 sets reporting deadlines for significant incidents, and Article 21 requires risk-management measures that include incident handling. For a database, the team needs a documented way to detect a failed primary, a compromised role or unauthorized data export, and to produce the timeline and scope that a report requires. Ask your national competent authority or sector regulator which reporting thresholds apply to you before you define alert rules.

NIS2 Directive text

Risk management measures under Article 21

NIS2 Article 21 asks for measures such as business continuity, backup management, disaster recovery, supply chain security and cryptography where appropriate. For PostgreSQL, these map to replication design, tested point-in-time recovery, TLS for connections and access reviews. Ask for the Commission Implementing Regulation (EU) 2024/2690 requirements if your entity falls within its scope, because it sets more detailed technical requirements for certain digital service sectors.

Implementing Regulation 2024/2690

Evidence DeployOpen prepares, not certifies

DeployOpen configures the database, documents its controls and assembles the evidence an assessor will request, such as configuration baselines, access reviews, backup and restore test records and change logs. DeployOpen does not issue audit reports, attestations or certifications. There is no CIP certificate and no NIS2 certificate. The NERC Compliance Enforcement Authority or your national authority assesses compliance, and an independent auditor or inspector reaches the conclusion.

US operators and EU operators face different supervision models

In the United States, the CIP Reliability Standards become mandatory once FERC approves them under section 215 of the Federal Power Act. NERC lists 13 CIP standards as mandatory and enforceable as of 17 October 2026, and each requirement applies to the systems in its scope table, so the impact rating of each system decides which obligations reach it.

  • Bright-line impact ratings: CIP-002-5.1a sorts BES Cyber Systems into high, medium and low impact using fixed criteria, and many later requirements apply by category.
  • Electronic Security Perimeter: CIP-005-7 requires routable-connected assets of high and medium impact systems to sit inside an Electronic Security Perimeter, and all interactive remote access must pass through an Intermediate System with encryption and multi-factor authentication.
  • Recent changes: CIP-003-9 became enforceable on 1 April 2026 and CIP-012-2 on 1 July 2026.
  • Registered population: FERC Order No. 919 identified about 1,673 unique US entities subject to mandatory compliance as of June 2025.

Confirm with your compliance team which of your systems, including any PostgreSQL historian, reporting database or control-center store, would be classified as a BES Cyber System, Protected Cyber Asset or associated access control or monitoring system before you choose the hosting design.

What do buyers ask before hiring a partner for energy PostgreSQL work?

How does impact classification change the cost of PostgreSQL work?

Impact classification sets how much of the database estate falls under CIP obligations, so it is the first driver of scope and cost. Under CIP-002-5.1a, BES Cyber Systems are sorted into high, medium or low impact using bright-line criteria in Attachment 1. Systems in higher categories bring more applicable requirements for electronic security perimeters, access control, monitoring and change management, and those requirements shape the database build. Ask any partner to confirm the classification of each system that will host or feed PostgreSQL before quoting, and to state which CIP requirement tables they assume apply. Systems outside CIP scope can often be built with lighter controls, but the boundary must be documented.

What do we need from our OT and compliance teams during the work?

The work needs named people from operations technology, the CIP compliance function and network security, because the database sits inside systems they already govern. OT engineers confirm network segments, data flows from SCADA, historians and meter sources, and any routable connectivity. Compliance staff confirm the Applicable Systems, evidence formats and change records their audits will expect. Security staff own the Electronic Security Perimeter, Intermediate System and multi-factor authentication decisions. Ask the partner for a written list of these inputs, the review points that need sign-off, and who approves changes to production systems.

Can our internal team deliver PostgreSQL for operational systems alone?

Some teams can, particularly where they already run PostgreSQL and have staff who understand both the database and the CIP requirements that apply. The gaps usually sit in high availability design, tested recovery, and documentation that maps configuration to compliance controls. PostgreSQL does not include software that detects a primary failure and promotes a standby, so automatic failover needs external tools that must be chosen, configured and tested. Ask your team to name who will own replication, backup restores, patching and upgrade planning after go-live. If those owners are not already in place, a partner can cover design and build while your staff learn to operate the system.

How long does a PostgreSQL project for a utility take?

Duration depends on the number of systems in scope, their impact classification, the number of data sources, and how many approvals each change needs. A single historian or metering database with standard replication takes less time than a set of operational systems that must sit inside an Electronic Security Perimeter with tested failover. No duration is given here because none has been researched for this topic. Ask any partner for a timeline built from a written scope, showing separate phases for design, build, testing, compliance evidence and handover, and state which steps depend on change windows or vendor reviews.

Is a fixed-scope quote written before the work starts?

Most DeployOpen engagements are fixed-scope, which means the scope, deliverables and timelines are agreed in writing before work starts. For an energy project, that written scope should list the systems covered, the impact classification assumed for each, the PostgreSQL features in use such as PostGIS or time-series partitioning, the high availability and recovery tests, and the compliance evidence to be prepared. DeployOpen does not publish a price list, so the quote follows from that document. Ask what changes would reopen the quote, such as a reclassification of a system or a new data source, and how those changes are priced.

What happens after handover, and are retainers available?

After handover, the utility owns the platform and needs a plan for patching, minor releases, backups, monitoring and the eventual major upgrade. PostgreSQL minor releases come at least once every three months and do not change the storage format, but major versions are supported for five years, so a major upgrade will fall within the operating life of most systems. DeployOpen offers ongoing support, upgrades and continuous testing as retainers. Ask the partner what is one-time work, what recurs, which evidence is refreshed for each CIP audit cycle, and who responds when a failover test fails.

Does DeployOpen provide the CIP or NIS2 certification for our systems?

No. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. For CIP, the Compliance Enforcement Authority monitors compliance through Compliance Audits, Spot Checks, Self-Certifications and other mechanisms, and there is no CIP certificate. For NIS2, national competent authorities oversee compliance, and no certificate of compliance is issued. Ask a partner to show how the evidence it prepares maps to the requirements your auditors will test, and confirm with your regulator which evidence they accept.

How replication, failover and recovery are chosen for operational systems

The replication mode is the first decision for operational data, because it sets how much committed data you can lose when a primary server fails. With synchronous replication, PostgreSQL holds a commit until the configured standbys confirm it, so a failover should not lose transactions the application saw as committed. The cost is latency on every write and a dependency on the standby being reachable. With asynchronous replication, the primary does not wait, so writes stay fast and a standby on a remote site or a congested link can lag behind. For grid, meter or asset data, the operations team should decide which records can be re-ingested from field devices or head-end systems and which cannot. Confirm the acceptable data loss with that team, then test the chosen mode under the write rate and network path your sites actually use.

PostgreSQL does not decide when a primary has failed or promote a standby on its own. The PostgreSQL failover documentation notes that the software does not detect a primary failure and notify the standby, so automatic failover depends on external tools. Those tools must handle fencing of the old primary, so that two servers do not accept writes after a network partition, and they must update the connection path that applications use. Hot standbys can also serve read-only queries, which may suit reporting or historical lookups, but operational control applications should not depend on a standby unless the team has tested its behavior during failover. Decide who is authorized to promote a node, whether promotion is automatic or manual, and how the change is recorded.

Replication does not replace backups, because a logical error or a bad deletion is copied to every standby. Point-in-time recovery combines a base backup with archived WAL files, so the team can restore to a moment before the error. Incremental backups taken with pg_basebackup reduce the volume of each base backup, and pg_combinebackup reconstructs a full backup at restore time. Recovery point and recovery time targets should come from the operations team and the owners of the metering and control systems, not from the database team alone. Once those targets are set, run a timed restore into a separate environment at least on a planned schedule, and record how long it took and what data was missing. Confirm the archive location, retention period and the process for restoring during an incident before the system goes live.

How DeployOpen scopes and delivers PostgreSQL for utilities

DeployOpen plans, implements, hardens, backs up, documents and supports self-hosted PostgreSQL inside the operator's own infrastructure. For energy and utilities, we start from the systems the database serves, the impact classification and regulatory scope that applies to them, and the recovery targets operations has agreed to, then build and hand over against that written scope.

How we scope

  • Inventory which databases hold grid, meter, asset or operational data and which systems read from them.
  • Confirm with compliance whether any system falls under NERC CIP impact categories or NIS2 obligations before design starts.
  • Agree in writing the PostGIS, time-series, high availability and recovery requirements, with the engagement fixed in scope and deliverables.

How we build

  • Design replication, failover and connection pooling around the availability targets for each operational system.
  • Configure authentication, TLS, privilege separation and audit logging so access can be shown to reviewers.
  • Test point-in-time recovery and failover with recorded results, not only configuration review.

How we hand over

  • Document the architecture, network boundaries, backup schedule, restore procedures and runbooks for operators.
  • Provide evidence packs that your compliance and security teams can review alongside their own auditors.
  • Walk your operations and platform staff through failover drills and the upgrade plan before handover closes.

How we support

  • Offer ongoing support, planned minor and major upgrades and continuous testing as a retainer.
  • Schedule restore and failover tests on a recurring basis so recovery stays proven as the system changes.
  • Confirm with your team the support hours, change windows and escalation path before the retainer starts.

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.