HeapDeck: Postgres® Monitor for iPhone

See what's burning in your Postgres.Put it out.

Paged about Postgres and your laptop is at home? HeapDeck shows who's blocking, how close you are to wraparound and which replica is falling behind, then lets you act from your iPhone. Stop the bleeding now; do the deep fix back at your desk.

Coming soon to the App Store Email me when it's out

Free · Pro $29.99 one-time · PostgreSQL 13–18 · iOS 17+ · iPhone

HeapDeck Health screen of a production server in a Critical state: blocked sessions first, then connections, the longest query, wraparound and replication

See who's blocking everyone in Postgres. Cancel the root with a preview.

Locks builds the blocking tree from pg_blocking_pids() and puts the root blocker on top: its pid, user@app, how long it has held the lock and what it is running. Under it, every session stuck in the queue.

  • Cancel root (unblocks N) says how many sessions are stuck behind it and lists their pids before you confirm. PRO
  • HeapDeck reads the chain again before it sends anything. If it changed while you were deciding, you see the new numbers and confirm again.
  • Cancel stops the running query. Terminate kills the session and rolls back its transaction, after you type its pid. PRO
  • Each waiter shows what it waits for, like RowExclusiveLock on public.orders. A root sitting idle in transaction is marked, and a deadlock is flagged as one.
Locks screen: the root blocker has been idle in transaction for 06:48 and blocks four sessions; below it the Cancel root (unblocks 4) button

Know your wraparound % before Postgres stops taking writes.

Vacuum & Bloat shows how close the server is to transaction ID wraparound, as a share of 2³¹, with the oldest tables by relfrozenxid age. At the limit, PostgreSQL refuses writes with database is not accepting commands to avoid wraparound data loss.

  • From 75% the screen says it plainly and lists the usual reasons autovacuum can't keep up: a long open transaction, an inactive replication slot, a stuck worker.
  • Dead tuples per table, with the dead share and when the table was last vacuumed.
  • Unused indexes with the space they hold. HeapDeck copies DROP INDEX CONCURRENTLY for you and never runs it itself.
  • Run VACUUM (ANALYZE) or ANALYZE on a table from the list. VACUUM FULL asks you to type the table name first. PRO
Vacuum & Bloat screen: transaction ID wraparound at 86%, a warning that the database stops accepting writes at 100%, and three likely causes

Reach your Postgres through your bastion, with the rights your role already has.

HeapDeck connects from your iPhone to your server, directly or through your SSH bastion. There is no HeapDeck server in between and no account. The AI assistant, if you set it up, talks only to the provider you chose, with your own key.

  • SSH tunnel with a password or an Ed25519 key. The bastion's host key is pinned on first connect.
  • TLS with sslmode=require by default. The certificate's SHA-256 fingerprint is pinned, and a changed certificate stops the connection until you decide.
  • Passwords, keys and fingerprints stay in this iPhone's Keychain, never synced. Face ID opens the app.
  • No superuser? HeapDeck shows the exact GRANT pg_monitor it needs instead of an empty screen.
Verify this server sheet on first connect: the server's SHA-256 certificate fingerprint, to compare with your records before trusting it

The screens you open during a Postgres incident

Ten health tiles up front and a native screen behind each one, so you never type psql on a phone keyboard. The SQL console is there when you need it, and it checks every statement before it runs.

  • Health

    One verdict and ten tiles: sessions against max_connections, blocked sessions, the longest query, TPS, cache hit, autovacuum, wraparound, replication, database size and slow queries. Refreshes every 10 seconds while open.

  • Activity

    Every session from pg_stat_activity, waiting ones first. Filter by active, idle in transaction, longer than 10 s or waiting. Swipe a row to cancel or terminate it.

  • Replication and slots

    Replay lag per standby, broken down by WAL phase. Every slot with the WAL it retains, and a warning when an inactive slot is filling your disk.

  • Slow queries

    The 300 heaviest statements from pg_stat_statements, sorted by total time, mean, calls or rows, and the sessions running one right now (PostgreSQL 14+).

  • Data and SQL console

    Browse tables, filter on the server, follow foreign keys, export a page as CSV or JSON. The console classifies each statement as you type; on Free, reads run inside BEGIN READ ONLY.

  • AI assistant PRO

    Explains an incident or a lock chain and drafts the fix, with your own API key or your own Ollama. It gets a redacted snapshot and never runs anything by itself.

HeapDeck 1.0 with sample data, in dark and light like iOS.

Postgres monitoring is free. Pro is one purchase.

Try it on your own production first: no monitoring screen has a paywall, on any number of servers. Pro unlocks the actions once, for $29.99. No subscription, no account.

Free

forever

Point it at production and see everything.

  • Every monitoring screen: Health, Activity, Locks, Vacuum & Bloat, Replication, Storage, Slow queries
  • Unlimited connections with TLS, SSH tunnel, pinned fingerprints and Face ID
  • Data browser with server-side filters, foreign keys, CSV and JSON export
  • SQL console for reads, inside a read-only transaction
  • The SQL classifier and its explanations

Pro

$29.99

one-time purchase

For the moment you need to act.

  • Cancel and terminate sessions, cancel the root of a lock chain
  • VACUUM, ANALYZE and dropping a replication slot
  • Writes and DDL in the console, behind confirmations
  • Insert, edit and delete rows in tables with a primary key
  • The AI assistant with your own key or model

Pro actions stay visible on Free, marked PRO, so you can see what they would do. The assistant works for free on the built-in demo incident. Outside the US, the App Store shows the price in your currency.

Coming soon to the App Store Email me when it's out

Free · Pro $29.99 one-time · PostgreSQL 13–18 · iOS 17+ · iPhone

Questions about HeapDeck and Postgres

Does it work with Amazon RDS, Cloud SQL, Azure or Supabase?

HeapDeck works with any PostgreSQL 13–18 your iPhone can reach, self-hosted or managed, primary or standby. Where your role is not a superuser, the screens show what is hidden and the GRANT pg_monitor that fixes it.

Managed providers sign certificates with roots that iOS doesn't ship. For them, use sslmode=require: the connection is encrypted and HeapDeck pins the certificate fingerprint on first connect.

Can it reach a database behind a bastion?

Yes. Turn on the SSH tunnel in the connection and enter the bastion's host, user and a password or key. The key must be an unencrypted Ed25519 key in OpenSSH format; the bastion's own host key can be Ed25519 or ECDSA and is pinned on first connect.

Version 1.0 doesn't support RSA keys, passphrase-protected keys, one-time codes or jump-host chains.

Do my credentials or data leave my iPhone?

HeapDeck connects to your server directly or through your SSH bastion. There is no HeapDeck server and no account. Passwords, SSH keys and pinned fingerprints stay in the iOS Keychain on this device, without iCloud sync.

Two things can leave the phone, both under your control: a question to the AI provider you set up (Pro), and crash reports and usage counts, which you can switch off on first launch or in Settings. Neither contains SQL, table names, hostnames, values or credentials. The details are in the privacy policy.

Do I need superuser?

No. A role with pg_monitor covers the monitoring screens: GRANT pg_monitor TO your_role;. Without it HeapDeck still works and labels what the server hides from your role. Cancelling other roles' sessions needs the usual PostgreSQL rights, such as pg_signal_backend.

Cancel or terminate: which one?

Cancel (pg_cancel_backend) stops the query a session is running; the session and its transaction stay open. Terminate (pg_terminate_backend) kills the whole session and rolls its transaction back.

A session that is idle in transaction has no running query, so cancel does nothing to it: terminate is what releases its locks. HeapDeck asks you to type the pid before terminating the root of a lock chain or a session on a Production connection.

Can HeapDeck break my database?

Free doesn't write at all: console reads run inside BEGIN READ ONLY … ROLLBACK. On Pro, every write passes four checks in order: Pro, the connection's Read-only switch, the SQL classifier and your confirmation.

VACUUM FULL, dropping a slot and terminating a lock root ask you to type the table name, slot name or pid first. A connection marked Production gets a PROD badge and stricter confirmations.

Why not just SSH in and run psql?

You still can. HeapDeck gives each incident question its own screen, so you don't type queries on a phone keyboard: who is blocking and how many wait, what the root is running, how close wraparound is, which slot holds WAL. It reads the lock chain again before acting and asks you to confirm.

What does the AI assistant see?

A redacted snapshot of the screen you asked about. Host, port, passwords and keys are never in it, and values become placeholders like $1. For cloud models, database, table and column names are hidden by default and put back on your phone when the answer arrives.

Requests go from your iPhone to the provider you chose with your own key (Anthropic, OpenAI, OpenRouter, Z.ai), or to your own Ollama or OpenAI-compatible server. “What the model sees” shows the exact text before you send it. The assistant is part of Pro and never runs SQL by itself.

Is there a subscription?

No. Monitoring is free, and Pro is a single purchase of $29.99 tied to your Apple ID. There is no account and no trial clock.

Will it alert me when something breaks?

No. HeapDeck works while it is open and does no background monitoring. Keep your alerting where it is: HeapDeck is the screen you open after the page.

Does it run on iPad?

HeapDeck is made for iPhone, in portrait. On iPad it runs in iPhone compatibility mode.

Guides for Postgres incidents

The problems that page you at night, one page each: the SQL to check by hand and what HeapDeck shows.

From the blog

All posts

Have it on your phone before the next Postgres incident.

Add a server, pin its certificate, and every monitoring screen is yours for free. Pro is there for the night you need to act.

Coming soon to the App Store Email me when it's out

Free · Pro $29.99 one-time · PostgreSQL 13–18 · iOS 17+ · iPhone