---
title: "Comment by Jesse M. Hoffer on \"A Job Queue in Plain Postgres with SKIP LOCKED\" | Hashnode"
description: "The fencing token point is the part people often skip. SKIP LOCKED solves claiming, but lease expiry is where duplicate side effects can sneak back in, so pairi"
url: "https://hashnode.com/posts/a-job-queue-in-plain-postgres-with-skip-locked-ds98e/6b0ff38ebae13f8e14a954d7/comment/6b1026f663b74b9ae4afde83"
---

[Discussion](https://hashnode.com/posts/a-job-queue-in-plain-postgres-with-skip-locked-ds98e/6b0ff38ebae13f8e14a954d7)

Comment [A Job Queue in Plain Postgres with SKIP LOCKED](https://hashnode.com/posts/a-job-queue-in-plain-postgres-with-skip-locked-ds98e/6b0ff38ebae13f8e14a954d7)

[Jesse M. Hoffer](https://hashnode.com/@jessemhoffer)

[13h ago](https://hashnode.com/posts/a-job-queue-in-plain-postgres-with-skip-locked-ds98e/6b0ff38ebae13f8e14a954d7/comment/6b1026f663b74b9ae4afde83)

The fencing token point is the part people often skip. SKIP LOCKED solves claiming, but lease expiry is where duplicate side effects can sneak back in, so pairing attempts with complete() is a neat way to close that hole without extra machinery.

[ZyVOP](https://hashnode.com/@zyvop)

[12h ago](https://hashnode.com/posts/a-job-queue-in-plain-postgres-with-skip-locked-ds98e/6b0ff38ebae13f8e14a954d7/comment/6b1026f663b74b9ae4afde83#reply-6b102ad1c47536a50720cd38)

Absolutely. One important distinction, though: the attempts check in complete() prevents a stale worker from updating the job record, but it doesn't prevent duplicate external side effects like sending an email or webhook. That's where idempotency keys become important. Queue-level safety and side-effect safety need to work together.
