Skip to content

Replace pg-boss with owned PostgreSQL queue store - #5

Merged
evantahler merged 4 commits into
mainfrom
cursor/remove-pgboss-rename-pg-queue-1738
Aug 29, 2026
Merged

Replace pg-boss with owned PostgreSQL queue store#5
evantahler merged 4 commits into
mainfrom
cursor/remove-pgboss-rename-pg-queue-1738

Conversation

@evantahler

@evantahler evantahler commented Aug 29, 2026

Copy link
Copy Markdown
Member

Summary

  • rename the package and project from pgboss-queue to pg-queue
  • remove pg-boss and replace its job/queue schema with owned pgrq_jobs and pgrq_queues tables
  • add bundled, versioned SQL migrations applied transactionally under an advisory lock
  • add atomic FOR UPDATE SKIP LOCKED job claiming and strengthen connection/migration tests
  • use PostgreSQL-safe pgqueue as the default schema and reject the reserved pg_ prefix
  • update the living phase plans and lessons learned

Verification

  • bun run lint
  • bun run build
  • bun test --max-concurrency=1 (78 pass, 7 documented Redis-only skips)
  • node scripts/assert-node-package.mjs
  • bun pm pack --dry-run (includes migrations/001_initial.sql)

Implements the revised storage design in docs/plans/02-connection-and-schema.md and docs/plans/03-queue.md.

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 29, 2026 06:30
Co-authored-by: Evan Tahler <evan@evantahler.com>
Co-authored-by: Evan Tahler <evan@evantahler.com>
@evantahler
evantahler marked this pull request as ready for review August 29, 2026 06:34
@evantahler
evantahler enabled auto-merge (squash) August 29, 2026 06:39
@evantahler
evantahler disabled auto-merge August 29, 2026 06:40
Comment thread src/core/queue.ts
Restore a single retry after FK 23503 so ensureQueue plus job insert
survives a concurrent queue delete.

Co-authored-by: Evan Tahler <evan@evantahler.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e6b9e24. Configure here.

Comment thread src/core/connection.ts Outdated
Comment thread src/core/queue.ts Outdated
Immediate jobs now COALESCE start_after to now(), and migrate() reuses
connect() so a failed bootstrap cannot leak an owned pool.

Co-authored-by: Evan Tahler <evan@evantahler.com>
@evantahler
evantahler merged commit 56cc341 into main Aug 29, 2026
6 checks passed
@evantahler
evantahler deleted the cursor/remove-pgboss-rename-pg-queue-1738 branch August 29, 2026 15:08
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