Working with PostgreSQL?

PostgreSQL slow or falling over? We fix it.

Postgres rarely fails all at once. It gets a little slower every month until one morning the app can't connect. We find out what it is actually waiting on and fix that, with your data intact.

  • Since 2015Fixing technology
  • FreeEstimates
  • US teamReal engineers

postgresql.log

still failing

What it is

PostgreSQL at a glance

PostgreSQL, often just called Postgres, is an open-source relational database: the place an application keeps its records and answers questions about them. It is known for being strict about data correctness and for handling complicated queries well.

It runs on your own server or as a managed service from most cloud providers. It is free, but it is not hands-off: left on its default settings and never maintained, a busy Postgres database slows down in ways that are easy to miss until they are urgent.

Type
Relational database
First released
1996 under the PostgreSQL name
License
PostgreSQL License, free and permissive
Maintained by
The PostgreSQL Global Development Group
Typically used for
Web and mobile app back ends, reporting, location data, anything where the data must be right

The honest version

PostgreSQL pros and cons

No technology is all upside. This is where PostgreSQL earns its place and where it tends to cause trouble.

Where PostgreSQL is strong

  • It protects your dataTransactions, constraints and strict types mean the database refuses bad data instead of quietly storing it.
  • One database, many jobsOrdinary tables, JSON documents, full-text search and location data all live in the same place, which often saves running a second system.
  • No licence billFree to use at any size, with no per-core or per-user fees and no vendor who can change the terms.
  • ExtensionsAdd-ons such as PostGIS for maps and pg_stat_statements for query tracking plug straight in without changing the database itself.

Where PostgreSQL bites

  • The defaults are conservativeA fresh install is tuned for a very small machine. Memory, checkpoint and planner settings need adjusting before it uses the hardware you are paying for.
  • Connections are expensiveEach connection is its own process. Apps that open hundreds of them run the server out of memory unless a connection pooler sits in front.
  • It needs housekeepingOld row versions pile up until vacuum clears them. When that falls behind, tables bloat and queries slow down.
  • Big upgrades take planningMoving between major versions is not an in-place patch. It needs a tested procedure and usually a maintenance window.

Sound familiar?

Common PostgreSQL problems we fix

The PostgreSQL problems that bring people to us, and what you have once each one is fixed.

duration: 48211 ms

Queries that used to be fast are slow

Missing or unused indexes, out-of-date statistics, or a query plan that changed as the table grew.

Indexed and measured

too many clients already

The app can't connect

Every app server opens its own connections until the limit is hit. Raising the limit only moves the crash.

Pooling in front of the database

table 41 GB · live rows 6 GB

The database keeps growing

Bloat from vacuum that can't keep up, often held back by a long-running or forgotten transaction.

Space reclaimed, vacuum tuned

No space left on device

The disk filled and it stopped

Write-ahead log files piling up behind a broken replica or a failed archive job.

Back up, with alerts before it fills

version unsupported

It is years behind on upgrades

An old major version that no longer gets security fixes, and nobody wants to be the one to touch it.

Upgraded with a rehearsed plan

last verified restore: never

Backups exist but nobody has restored one

A nightly dump that may or may not be complete, and no way to recover to a point in time.

Restores tested on a schedule

What we do

PostgreSQL help, from rescue to upkeep

Call us for one slow query, or hand us the whole database.

Rescue
Down, out of disk or refusing connections. We get it serving again, then find out why it stopped.
Performance
Query and index work, memory and checkpoint settings, connection pooling, with numbers before and after.
Upgrades
Major version upgrades rehearsed on a copy first, so the real one is uneventful.
Backup and recovery
Point-in-time recovery, off-server copies, and restores that have actually been run.
Migrations
Moving between hosts or cloud providers, or onto Postgres from another database.
Managed Tech
Monitoring, maintenance and a team to call, on an ongoing basis.

How it works

From first message to fixed

  1. Look Free estimate

    Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.

  2. Fix

    We fix the cause, not the symptom. If something is down, getting it back up comes first.

  3. Harden

    Backups, monitoring, updates and access, so the same problem can't quietly come back.

  4. Hand back or stay on

    You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.

Often found together

Running PostgreSQL alongside something else?

We work on the whole stack, so the problem can be wherever it actually is.

Questions

PostgreSQL questions

Something else? Call+1 737 727 7327

Why is my PostgreSQL database slow?

Most often it is a small number of queries doing far more work than they need to, because an index is missing or the planner's statistics are stale. Default memory settings, table bloat and too many open connections are the other common causes.

What does 'too many clients already' mean?

The database has hit its connection limit. The lasting fix is usually a connection pooler such as PgBouncer and an app that reuses connections, not a higher limit.

Is it safe to upgrade PostgreSQL?

Yes, when it is rehearsed. We run the upgrade against a copy of your data first, check the application against it, and only then schedule the real one.

Should I use a managed PostgreSQL service?

Often, yes. A managed service takes backups, patching and failover off your plate. It does not tune your queries or design your indexes, and those are where most performance problems live.

Can you recover a PostgreSQL database that won't start?

Frequently, depending on what failed and what backups exist. The most important thing is not to delete or reinitialise anything before someone has looked at it.

How much does PostgreSQL help cost?

Estimates are free. Describe the problem and you get a price before any work begins.

Free estimate

Need help with PostgreSQL?

Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.

  • No charge to find out what it will take
  • If it's urgent, say so

Replies come from a person. By sending, you authorize us to email you back. No marketing.