nowfound

Life & fun · May 17, 2023

Postgres query lock explainer

This is like 4 years old, but I’m braver now and ready to share stuff with this community. I’ve been a lurker for a while. I made this tool - it’s kind of like “explain” but it tells you about what locks would be required by the query. I was making it as part of a larger tool that would try to prevent deadlocks during migrations at my last company, I never finished it.

Postgres query lock explainer launched on May 17, 2023 with 143 votes, #283 of 4,910 launches that month and more than 95% of that year's launches. The site was still online in September 2026, 3 years on.

Visit github.com ↗Alternativestop 6% of May 2023

In plain words

Postgres Query Lock Explainer analyzes PostgreSQL queries to show what locks they would require, similar to the explain command but focused on locking behavior. Built for database administrators and developers working with Postgres, it helps understand lock requirements during query execution. The tool originated from a larger project aimed at preventing deadlocks during database migrations.

written from the facts on this page · September 2026

From the sources

Command line utility to show what locks will be acquired by a given query. - AdmTal/PostgreSQL-Query-Lock-Explainer

Does a similar job

all alternatives →
  • I made a tool to visualize MySQL EXPLAIN query plans2024 · mysqlexplain.com · ▲19

    I was always confused when trying to optimize a slow MySQL query as the output of the EXPLAIN command is so cryptic and totally useless. And there wasn't any tool that could help visualize what a query does - compared to PostgreSQL which has multiple... So, I started developing such a tool for MySQL. But boy, I didn't expect how complicated this is in reality. There were so many things hiding in tiny information pieces that I had to understand. But it also confirmed me in that a tool should try to understand the EXPLAIN output and not a human as it is too easy to oversee something. After…

  • AU
    A user interface for Postgres EXPLAIN that also gives tips2019 · pgmustard.com · ▲50

    pgMustard is a Postgres EXPLAIN visualisation tool that also gives performance advice, scored based on its potential to speed up your query.

  • PgQueuer – Transform PostgreSQL into a Job Queue2024 · github.com · ▲376

    PgQueuer is a Python job queue that uses PostgreSQL for everything — queue storage, locking, notifications. No Redis, no RabbitMQ, no separate broker to operate. If your app already has Postgres, you already have the broker. After ~2 years and 26 minor releases, 1.0 ships today as the first stable release. Strict semver from here on. Thanks to everyone who contributed and left feedback!

  • pglockanalyze - See the locks your Postgres migrations will acquire2025 · github.com · ▲8

    Hello! I created this tool to make reasoning about Postgres locks a bit easier. Given a database[1] and a set of DDL statements/migrations you want to check, pglockanalyze will open a transaction, execute the statements, read the pg_locks view to analyze the locks they acquire and rollback (or commit, depending on the flags you passed) the transaction. Then, it will output the results for each statement. I think there's merit in this idea, that said it's very much an experiment so there could be flaws and/or corner cases that this strategy won't work well for. It's meant to act as…

  • pganalyze2019 · pganalyze.com · ▲84

    Automated EXPLAIN Plan Visualization & Insights for Postgres

  • PgDog – Scale Postgres without changing the appFeb 2026 · github.com · ▲326

    Hey HN! Lev and Justin here, authors of PgDog (https://pgdog.dev/), a connection pooler, load balancer and database sharder for PostgreSQL. If you build apps with a lot of traffic, you know the first thing to break is the database. We are solving this with a network proxy that works without requiring application code changes or database migrations. Our post from last year: https://news.ycombinator.com/item?id=44099187 The most important update: we are in production. Sharding is used a lot, with direct-to-shard queries (one shard per query) working pretty much…

More life & fun this month

the category →

Source: Show HN post ↗

Launched alongside, May 2023

the whole month →
  • Sidekick▲1,341

    An AI-powered accessibility assistant in Stark

    AI · 2023 · getstark.co

  • In today's world, catchy headlines and articles often distract readers from the facts and relevant information. By utilizing OpenAI's language models, Boring Report processes sensationalist news articles, transforms them into the content you see, and helps readers focus on the essential details. We recently updated our iOS app experience, so any and all feedback would be appreciated. App Link: https://apps.apple.com/us/app/boring-report-news-by-ai/id644...

    AI · 2023 · boringreport.org

  • Generating powerful websites, one prompt at a time

    AI · 2023

  • AudioPen▲888

    The easiest way to convert messy thoughts into clear text

    AI · 2023 · audiopen.ai

  • Launch your website in seconds, get users in minutes

    Dev tools · 2023 · page.mmntm.build

  • Moda▲791

    An e-commerce growth marketing platform

    Growth · 2023