Skip to content

blog: You Don't Need a Job Queue, Postgres Already Has SKIP LOCKED - #8079

Merged
nurul3101 merged 2 commits into
mainfrom
blog/skip-locked-job-queue
Jul 17, 2026
Merged

blog: You Don't Need a Job Queue, Postgres Already Has SKIP LOCKED#8079
nurul3101 merged 2 commits into
mainfrom
blog/skip-locked-job-queue

Conversation

@nurul3101

@nurul3101 nurul3101 commented Jul 17, 2026

Copy link
Copy Markdown
Member

Summary

Part 4 of the postgres-features series (after Pub/Sub via LISTEN/NOTIFY, the bloom index, and pgvector). Builds a background job queue with retries, backoff, and concurrent workers on FOR UPDATE SKIP LOCKED — one table, a handful of queries, no broker.

Why this topic: PostHog + GSC data shows the Postgres-education franchise is the blog's most reliable evergreen lane — the pub/sub post still ranks ~position 5 for its non-branded query family a year after publishing. This post extends that validated pattern into the adjacent "postgres job queue / skip locked" search space.

What's in the PR

  • New post at apps/blog/content/blog/you-dont-need-a-job-queue-postgres-already-has-skip-locked/ (slug joins the series; bloom-index post's frontmatter gains the next: pointer)
  • Hero SVG + meta PNG in the Eclipse house style (SKIP LOCKED drawn literally: worker-1 holds a locked row, worker-2 skips to the next)
  • Fixes a corrupt GeistMono.woff2 in the hero-image skill's bundled fonts

Verification

  • Code: the full demo and every standalone SQL block were run against real temp Prisma Postgres databases (PostgreSQL 17.2, Bun 1.2, pg 8.22) — twice by the author session and once independently by a code-refuter agent. The expected-output block is a real captured run.
  • Adversarial review: independent fact / code / reader-skeptic / positioning reviewer agents ran in fresh contexts over multiple rounds until each lens returned zero findings. Notable catches fixed along the way: crash-recovery lock semantics, janitor implementability (lease + fencing guard + poison-job cap), at-least-once honesty with a concrete idempotency pattern, Compute claims aligned to the shipped Public Beta docs rather than aspirational positioning, pooled-vs-direct connection guidance, and a pg-boss feature claim (archiving was removed in v11).
  • Served page: rendered HTML checked on the dev server — FAQ accordion bodies present, headings/TOC correct, all 10 links return 200.
  • SEO/GEO pass: answer-first lead, standalone definition block, FAQ accordions, verified-version claims, metaTitle/metaDescription tuned to "postgres job queue / skip locked" queries.

Summary by CodeRabbit

  • New Features

    • Added a new blog post explaining how to build a durable background job queue with PostgreSQL.
    • Includes concurrency-safe job claiming, retries, failure handling, worker examples, crash recovery considerations, and operational guidance.
  • Documentation

    • Updated blog navigation to link the PostgreSQL job queue article as the next post.

Part 3 of the postgres-features series. Builds a job queue with retries
and concurrent workers on FOR UPDATE SKIP LOCKED; demo verified against
a real Prisma Postgres database (PostgreSQL 17, Bun 1.2, pg 8.22).

- Chain the series: bloom-index post now points next to this one
- Hero SVG + meta PNG in the Eclipse house style
- Fix corrupt GeistMono.woff2 in the hero-image skill's bundled fonts
  (replaced with the valid Geist Mono woff2 shipped by Next.js)
@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Jul 17, 2026 11:05am
docs Ready Ready Preview, Comment Jul 17, 2026 11:05am
eclipse Ready Ready Preview, Comment Jul 17, 2026 11:05am
site Ready Ready Preview, Comment Jul 17, 2026 11:05am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds an MDX article explaining a Postgres-backed job queue with SKIP LOCKED, including schema, queries, workers, retries, and operations guidance. Updates the previous article’s next-post navigation link.

Changes

Postgres job queue article

Layer / File(s) Summary
Article metadata and queue concepts
apps/blog/content/blog/you-dont-need-a-job-queue-postgres-already-has-skip-locked/index.mdx, apps/blog/content/blog/you-dont-need-a-vector-database-postgres-already-has-pgvector/index.mdx
Adds article metadata, navigation, queue motivation, concurrency requirements, and FOR UPDATE SKIP LOCKED semantics.
Queue schema and concurrency demo
apps/blog/content/blog/you-dont-need-a-job-queue-postgres-already-has-skip-locked/index.mdx
Defines the jobs table, indexes, queue queries, and a Bun/TypeScript demo with concurrent workers, retries, and final state output.
Operations guidance and recap
apps/blog/content/blog/you-dont-need-a-job-queue-postgres-already-has-skip-locked/index.mdx
Documents worker control flow, crash recovery, idempotency, deployment models, dedicated queue tradeoffs, FAQs, and the recap.

Estimated code review effort: 4 (Complex) | ~45 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: a new blog post about using Postgres SKIP LOCKED as a job queue.

Comment @coderabbitai help to get the list of available commands.

The pgvector post (#8061) merged to main as postgres-features part 3.
This post becomes part 4: bloom keeps main's next pointer (pgvector),
pgvector gains next (this post), and this post's frontmatter and series
references update to fourth/prev-pgvector.
@nurul3101
nurul3101 merged commit 3dac0d2 into main Jul 17, 2026
14 of 17 checks passed
@nurul3101
nurul3101 deleted the blog/skip-locked-job-queue branch July 17, 2026 11:07
@argos-ci

argos-ci Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jul 17, 2026, 11:14 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants