PostgreSQL Consulting Services

    For teams running PostgreSQL in production, self-hosted or on Amazon RDS, Aurora, Azure or Google Cloud SQL. Queries slow down as the data grows, autovacuum falls behind, and the major version upgrade keeps slipping while the version gets closer to end of life. DharmOps finds the cause, fixes it or runs the upgrade, and stays on to support it.

    An engineer replies within 24 hours. Or describe the problem first, and see our PostgreSQL case studies.

    Common PostgreSQL Problems We Fix

    Most teams don't call it a database problem at first. They notice a slow page, a timed-out report or a line on the AWS bill. Support policies are from the PostgreSQL versioning policy and the Amazon RDS for PostgreSQL release calendar.

    Production runs a version near or past end of life

    The PostgreSQL community fixes each major version for five years, then stops, security fixes included. A database installed a few years ago and never upgraded crosses that line quietly. It keeps running, but the next security advisory won't cover it, and every year the upgrade crosses more versions.

    The cloud bill charges extra for an old version

    On Amazon RDS and Aurora, a PostgreSQL version that has left standard support moves to Extended Support automatically. It is billed per vCPU per hour on top of the instance price, on every instance still on that version, replicas included, and the rate rises after the second year. Nobody chose to pay it, so nobody notices it.

    The major upgrade keeps getting postponed

    pg_upgrade can move the primary in minutes, but standbys have to be rebuilt or resynced, extensions have to exist for the new version, and if planner statistics don't carry over, queries run slow until ANALYZE finishes. Nobody wants to own that weekend, so the upgrade slides another quarter.

    Queries slow down and CPU sits near 100%

    Pages that returned in milliseconds now take seconds, reports time out, and "too many connections" errors appear at peak. Each PostgreSQL connection is its own server process, and max_connections defaults to 100. Bigger instances help for a few weeks, then the same queries catch up.

    Tables bloat and autovacuum can't keep up

    Dead rows pile up, storage grows faster than the data, and indexes get slower. If vacuum falls far enough behind, PostgreSQL stops accepting writes to protect itself from transaction ID wraparound, because transaction IDs are 32-bit and must be frozen before they run out.

    AI and analytics teams want production data

    Text-to-SQL tools, AI agents and BI dashboards all want to read the live database. Pointed at the primary, their wide queries compete with customers. Moved to a replica, long queries get cancelled, or hot_standby_feedback holds back vacuum and bloats the primary.

    PostgreSQL Consulting at DharmOps

    PostgreSQL consulting is diagnosing, fixing, upgrading and supporting the PostgreSQL databases your product runs on: the queries and indexes, the settings, vacuum, replication and backups, and the version it runs. It is part of our database engineering work.

    PostgreSQL Health Check & Diagnostic

    • Top queries from pg_stat_statements
    • Memory, connection, WAL and checkpoint settings
    • Autovacuum, bloat and transaction ID age per table
    • Indexes: missing, unused and duplicated
    • Replication, failover and backup review
    • Version, extensions and upgrade readiness

    Version Upgrades

    • Major version upgrades, including jumps across several versions
    • pg_upgrade with --link, or logical replication cutover
    • Amazon RDS Blue/Green major version upgrades
    • Extension and collation checks before the upgrade
    • Rehearsal on a copy at production size
    • Query plan comparison before and after

    PostgreSQL 18 performance improvements

    Performance Tuning

    • Slow query analysis with EXPLAIN (ANALYZE, BUFFERS)
    • Composite, partial and covering indexes
    • shared_buffers, work_mem and effective_cache_size
    • Partitioning for large, time-ordered tables
    • Connection pooling with PgBouncer or RDS Proxy
    • Fixes for lock waits and long transactions

    PostgreSQL connection exhaustion and PgBouncer

    Vacuum, Bloat & Wraparound

    • Per-table autovacuum settings
    • Bloat measured and reclaimed without long locks
    • Transaction ID age monitoring and alerts
    • Long-running transactions and idle sessions found
    • Replication slots that hold back cleanup

    High Availability & Backups

    • Streaming replication and replica lag
    • Failover with Patroni, CloudNativePG or managed Multi-AZ
    • Backups with pgBackRest, WAL-G or managed snapshots
    • Point-in-time recovery tested by a real restore
    • Written recovery time and data loss targets

    Migration to PostgreSQL

    • Oracle to PostgreSQL, including PL/SQL conversion
    • SQL Server and MySQL to PostgreSQL
    • Self-hosted to Amazon RDS, Aurora, Azure or Cloud SQL, or back
    • Rehearsed migrations with logical replication
    • Row counts and checksums compared before cutover

    Oracle to PostgreSQL migration cost

    pgvector, AI & Analytics Workloads

    • pgvector with HNSW or IVFFlat indexes
    • Read replicas sized for analytical and agent queries
    • Read-only roles and row-level security for AI tools
    • Statement timeouts so runaway queries stop
    • Change data capture to a warehouse instead of the primary

    Operations & Ongoing Support

    • Fixes when a query, replica or failover breaks
    • Planned minor and major version upgrades
    • Capacity planning as data and traffic grow
    • Query and schema review for new features
    • Ongoing support from the engineers who did the work

    Who It's For

    Companies whose product or internal systems run on PostgreSQL and who see slow queries, high CPU, growing storage or connection errors. Also teams on a version near or past end of life, or paying Extended Support on a managed cloud.

    What It Solves

    Slow pages and reports, outages from connections or disk, bloat, upgrades that keep slipping, paying for unsupported versions, and a database that only one person understands.

    How It Starts

    With a diagnostic, not a bigger instance or a quote. The diagnostic decides whether to tune what you have, upgrade first, change how the database is hosted, or move part of the load elsewhere.

    What It Isn't

    We don't resell database licences or hosting, and we don't take over routine administration such as user account requests. Data pipelines and warehouses sit with Data Engineering, and cloud spend outside the database with Data Cost Optimization.

    Where It Sits in Your Stack

    PostgreSQL sits under your application, and often under your ERP, your orchestrator and your AI tools as well. When a page is slow or a dashboard stalls, the cause is often a query plan, a missing index or vacuum falling behind, not the code that sent the query.

    What Changes When PostgreSQL Is Fixed

    What DharmOps puts in place in a PostgreSQL consulting engagement and what it means for you
    What we put in placeWhat it means for you
    A supported PostgreSQL version, upgraded on a rehearsed planSecurity fixes keep arriving, and no Extended Support line appears on the AWS bill
    Indexes, settings and queries tuned to your real workloadPages and reports get faster without buying a bigger instance
    Autovacuum settings per table, with transaction ID age on an alertStorage stops growing for no reason, and wraparound never takes writes offline
    Connection pooling sized to your trafficPeak hours stop ending in "too many connections" errors
    Failover and restores tested, with runbooksYou know how long recovery takes and how much data is at risk before you need to
    A separate path for AI and analytics readsNew AI and reporting tools get the data without slowing your product

    What You Receive and What You Provide

    What You Receive

    Diagnostic output

    A written assessment of your PostgreSQL: top queries, settings, vacuum and bloat, transaction ID age, replication, backups and upgrade readiness, with fixes ranked by impact and effort.

    Upgrade plan

    If your version is near or past end of life, the target version, the method (pg_upgrade, logical replication or RDS Blue/Green), extension and collation checks, the rehearsal plan, and a cutover plan with a rollback.

    Performance fixes

    Index, query, configuration and partitioning changes, each tied to the query or metric it improves and measured against the baseline.

    Recovery setup

    Replication and failover set up or fixed, backups that have been restored at least once, and written recovery time and data loss targets.

    Cost changes

    On RDS and Aurora, the instances and replicas that would be billed for Extended Support, and right-sizing tied to measured load.

    Monitoring and alerts

    Query latency, slow queries, connections, replica lag, bloat and transaction ID age, with alerts that point to a runbook.

    Runbooks

    Step-by-step procedures for failover, restore, upgrades, vacuum emergencies and connection exhaustion, written so a junior engineer could follow them alone at 2am.

    Documentation and training

    Why each setting, index and design choice is the way it is, and sessions for the developers who write queries against it.

    Ownership

    The configuration, migrations, scripts and documentation belong to you. Nothing proprietary sits between your application and your database.

    What You Provide

    1. A read-only monitoring role with pg_monitor, not a superuser, and pg_stat_statements turned on (it needs a restart if it isn't already loaded).
    2. People who own the application: someone who knows which queries matter most and which features depend on them.
    3. Your critical workloads and the windows the business can accept for maintenance, such as a quiet Sunday morning.
    4. Your current setup: PostgreSQL version, extensions, data size, replicas, and where it runs: self-hosted, RDS, Aurora, Azure or Cloud SQL.
    5. Infrastructure and security contacts who can approve network, access and change requests.
    6. Early notice of regulated data such as health, financial or personal data, so handling is agreed before work starts.

    How an Engagement Works

    Six steps, in order. Each ends with something you can see, and nothing moves on until you've approved it.

    1. Discovery call
    2. Diagnose
    3. Prioritize
    4. Fix
    5. Stay

    Discovery Call

    We talk through what you're seeing in PostgreSQL, the version and hosting you run, and what you've already tried.

    • You receive: a clear answer on whether PostgreSQL consulting is the right next step
    • You provide: a short description of the symptoms, your PostgreSQL version and where it runs
    • Approval: both sides agree there is something to diagnose

    Diagnostic

    The step after the discovery call, and the gate before any scope is set. Using a read-only role, we review your top queries, settings, vacuum and bloat, replication, backups and upgrade readiness.

    • You receive: a written plan ranking fixes by impact and effort, an upgrade plan if your version is near or past end of life, and the cost and risk behind each option
    • You provide: the read-only role, pg_stat_statements turned on, read access to cloud metrics, and time with the people who own the application
    • Approval: you approve the plan

    Scope is quoted after this step, not before

    Design

    We design the changes: indexes, settings, partitioning, pooling, replication and, for upgrades, the method and cutover plan.

    • You receive: a design document covering each change, its expected effect and how it is rolled back
    • You provide: sign-off from your infrastructure and security contacts
    • Approval: you sign off on the design before any change starts

    Fix and rehearse

    We apply the fixes found in the diagnostic, measured against the baseline. Upgrades and migrations are rehearsed on a copy at production size until the cutover holds no surprises.

    • You receive: changes delivered as versioned migrations and configuration, rehearsal results, and documentation written as we go
    • You provide: a named contact who answers questions promptly, and decisions on any change we flag
    • Approval: each change is accepted against criteria agreed in the design

    Cut over

    For upgrades and migrations, the cutover runs in the window you chose, with row counts, checksums and query plans compared before traffic moves. The old cluster stays available until you approve retiring it.

    • You receive: matching data, query timings compared against the baseline, and a log of what was done
    • You provide: someone on your side to confirm the application behaves as expected
    • Approval: you approve retiring the old version or database

    Ongoing support

    Support starts at cut over, with the same engineers who did the work. The first weeks get closer attention, because that is when production surprises appear.

    • You receive: fixes when something breaks, planned minor and major upgrades, capacity planning, query review for new features, and runbooks that stay current
    • You provide: a named contact, and early notice when traffic, data size or features are about to change
    • Approval: support scope is agreed in writing before support begins

    Continues after cut over, with the same engineers

    Timeline

    How Timing Works

    The diagnostic produces a timeline with milestones, each tied to something you can verify, not only a date. Dates move when a dependency on either side moves, and we tell you the same day it happens. The dependencies that matter most:

    • Databases: how many clusters and environments are involved, and how large the biggest tables are.
    • Version gap: how many major versions an upgrade crosses, and which extensions have to come along.
    • Replicas and failover: how many standbys, logical replication subscribers and failover tools have to move with the primary.
    • Hosting: self-hosted, Amazon RDS, Aurora, Azure Database for PostgreSQL or Google Cloud SQL, and whether that changes as part of the work.
    • Access: how quickly the read-only role, cloud metrics and change approvals are granted.
    • Change windows: how often the business can accept a maintenance window, and any compliance review it needs first.

    PostgreSQL Engagements We've Run

    Reports timing out on a 340GB PostgreSQL database

    Situation
    An operations platform's main report took 3–4 minutes and often timed out, with disk I/O saturated.
    What we did
    Tuned memory settings, fixed autovacuum per table and reclaimed 48 GB of dead rows, built a covering partial index without locking, and partitioned the 180-million-row events table by month.
    Result
    4 min → 17 s, 60% less disk I/O at peak, zero downtime.

    Read the 340GB PostgreSQL case study

    Moving a US insurer from Oracle to PostgreSQL

    Situation
    Oracle licensing and an ageing platform, with 120+ PL/SQL packages and 30+ scheduled jobs.
    What we did
    Converted every package and job, moved the jobs to pg_cron, and ran three full rehearsal migrations with logical replication before the cutover.
    Result
    0 records lost, zero downtime, Oracle licensing removed.

    Read the Oracle to PostgreSQL case study

    A city traffic platform on PostgreSQL

    Situation
    Sensor ingestion slowed and peak-hour reports timed out on an 800-million-row dataset.
    What we did
    Partitioned the largest tables, added BRIN indexes for time-ordered data, and put PgBouncer in front of PostgreSQL.
    Result
    Faster ingestion and peak reports that finish, with zero downtime.

    Read the traffic platform case study

    More on our work in all case studies.

    Why Teams Bring DharmOps In for PostgreSQL

    We diagnose before we recommend.We read your query statistics, settings and vacuum history through a read-only role before suggesting a bigger instance, a new version or a different engine. The written plan comes before any timeline or price.

    We rehearse upgrades at production size.Every major upgrade and migration is run on a copy of your data first, with query plans compared before and after, so the cutover is the rehearsal you've already seen work.

    We work on the engines around it too.If PostgreSQL runs next to SQL Server, Oracle or MySQL, or you're moving off one of them, one team covers both sides. Our engineers bring hands-on, cross-platform database expertise.

    You own it, and we stay.Configuration, migrations and runbooks are yours, whether PostgreSQL runs on your servers or on a managed cloud service. After the work, DharmOps stays on to support it.

    How We Handle Your Systems

    Your PostgreSQL database holds your customers' data. Giving an outside team access to it is a serious decision. These are the rules we work by.

    • NDA before any access. Signed before we see anything.
    • Least access. A read-only monitoring role first. Write access only for approved changes.
    • Approval before access. You approve each access level before we use it.
    • Your data stays where it lives. We work inside your environment, in the cloud or on-premises.
    • Deletion we verify. When work ends, anything we held is deleted and the deletion is confirmed.
    • Written incident procedure. If something goes wrong, there is a documented process, not improvisation.

    PostgreSQL Questions Teams Ask Before Booking

    What does a PostgreSQL consultant do?

    A PostgreSQL consultant diagnoses and fixes the database your application runs on: slow queries, high CPU, connection exhaustion, autovacuum and bloat, replication and backups. They also plan and run major version upgrades and migrations to PostgreSQL from Oracle, SQL Server or MySQL. DharmOps also stays on to support the database after the work is done.

    How long is a PostgreSQL version supported?

    The PostgreSQL community releases a new major version about once a year and supports each one for five years. During that time it gets minor releases with bug and security fixes at least every three months. The community recommends always running the latest minor release of your major version. The current dates for each version are on the PostgreSQL versioning page.

    What happens when a PostgreSQL version reaches end of life?

    The database keeps running, but it gets no more bug or security fixes after its final minor release. Security issues found later are only fixed in supported versions. On Amazon RDS and Aurora, the version stays in standard support for a short time after the community end of life, then moves to paid Extended Support for up to three years before an upgrade is forced.

    How much does Amazon RDS Extended Support cost for PostgreSQL?

    It is charged per vCPU per hour, on top of the normal instance price, and depends on the region, the version and how long the version has been out of standard support. The rate rises from the third year. Every instance on the version is billed, replicas included, so a cluster with large instances and several replicas pays the charge many times over. Upgrading to a supported version stops it.

    Which PostgreSQL version should we upgrade to?

    You can skip intervening major versions, so the target is usually the newest major that has had a few minor releases, is supported by every extension you use, and is offered by your cloud provider. Amazon RDS adds a new major version within 30 days of its first minor release. Moving to a recent version also gives you the longest time before the next upgrade.

    Can PostgreSQL be upgraded without downtime?

    Close to it. pg_upgrade with the --link option moves the data in minutes, but the database is down while it runs and standbys need rebuilding. For near-zero downtime, logical replication copies the data to a new cluster on the target version, and the cutover takes seconds to minutes. On Amazon RDS, Blue/Green Deployments do a similar switchover for major upgrades.

    Why is my PostgreSQL database slow?

    The usual causes are queries without a matching index, settings still at their defaults (shared_buffers at 128 MB, work_mem at 4 MB), table bloat from autovacuum falling behind, too many direct connections, and long transactions holding locks. After a major upgrade, missing planner statistics are another common cause. pg_stat_statements and EXPLAIN (ANALYZE, BUFFERS) show which one applies.

    What is transaction ID wraparound in PostgreSQL?

    PostgreSQL gives each writing transaction a 32-bit ID, so the counter runs out after about two billion transactions. Vacuum has to freeze old rows before that happens. If it falls too far behind, PostgreSQL stops accepting writes until a vacuum completes. Monitoring the age of the oldest transaction ID per table, and tuning autovacuum, prevents it.

    Should we use PgBouncer or RDS Proxy?

    Both pool connections so the database runs fewer server processes. PgBouncer is open source, runs wherever you put it, and in transaction mode lets thousands of clients share a few dozen connections. RDS Proxy is managed by AWS and handles failover for you, but it is billed per vCPU of the database behind it, and session-level features can pin a client to one connection, which reduces the pooling.

    Can PostgreSQL be used as a vector database?

    Yes. The pgvector extension stores embeddings in PostgreSQL and searches them with exact or approximate nearest-neighbour queries, using HNSW or IVFFlat indexes. It keeps vectors next to the rows they describe, with the same backups and access control. At larger sizes, index build time, memory and query load on the primary need planning.

    What are the downsides of PostgreSQL?

    Each connection is a separate process, so many direct connections need a pooler. Updates leave dead rows that vacuum has to clean up, and a neglected vacuum leads to bloat or, at the extreme, wraparound. Major upgrades need pg_upgrade or a replication-based move. Each version is supported for five years, so upgrades are a regular task. None of these block it, but each needs an owner.

    How is PostgreSQL consulting priced?

    Scope is quoted after the diagnostic, once we have looked at your database, and before you commit. Cost depends on the number of databases and environments, data size, the version gap for upgrades, replicas and hosting, compliance requirements and whether support continues afterward.

    What happens after the work is done?

    The same engineers stay on. They fix breaks, run planned minor and major upgrades, plan capacity as data and traffic grow, and review queries and schema changes for new features. The runbooks and documentation stay current, so your database doesn't depend on one person.

    Support policies are from the PostgreSQL versioning policy, and Amazon RDS support and pricing details from the RDS release calendar and RDS for PostgreSQL pricing.

    Database Engineering Use Cases by Industry

    A slow or fragile database costs different things in different industries: a missed report deadline, a failed recovery, a checkout that stalls at peak. The cause is usually in the queries, the configuration or the recovery plan.

    Database Engineering for Banking & Insurance

    Moving off Oracle for licensing cost is a large project. We fix the design problems first so they don't move with you, and rehearse the migration in full against a copy of production before the cutover.

    Database Engineering for Healthcare

    Clinical and claims systems can't afford an untested recovery. We rehearse failover and test restores, and write the runbooks, so recovery doesn't depend on someone remembering the steps.

    Database Engineering for Retail & eCommerce

    A product page or checkout that slows at peak usually traces to a query plan or a connection limit, not the size of the server. We measure it and fix the cause before adding hardware.

    Database Engineering for SaaS & Software

    Dashboards that were fast at launch slow down as customer data grows. We find the query and index causes, and every change lands in your repository for your engineers to review.

    Database Engineering for Manufacturing

    End-of-day reports that run for hours can block order entry. We trace the heaviest reports to their queries and processing logic, and fix them without changing what the report shows.

    Database Engineering for Logistics

    Shipment and fleet data arrives in constant high-volume writes. We tune ingestion and keep peak-hour reports finishing, with the work tested before it reaches production.

    Start With a Conversation About Your PostgreSQL

    If your queries are slowing down, autovacuum can't keep up, or a version upgrade keeps slipping, the first step is a 30-minute discovery call.

    PostgreSQL is a registered trademark of the PostgreSQL Community Association.