refactor: rename to XXX; clarify log vs task queue#76
Closed
Conversation
The "queue" framing in the previous name (PgQue) actively fought the actual shape of the system. From the HN thread: "Why insist on calling this a queue when it doesn't really have queue semantics? Queues do the job of load balancing between different workers. When workers acknowledge tasks, they get deleted, and there are visibility timeouts. This is a log." The commenter is right. What we ship is an append-only event log with per-consumer cursors and native fan-out — a Kafka topic shape, not an ActiveMQ / RabbitMQ / SQS task-queue shape. The old name sent the wrong mental model at first read. New name: logres. Short, has no pg_ prefix (no extension confusion), no collision with Postgres built-ins, evokes "log" directly. ## Rename Project identifier pgque / PgQue -> logres everywhere: - Schema: every pgque.* in SQL -> logres.* - Roles: pgque_reader / pgque_writer / pgque_admin -> logres_reader / logres_writer / logres_admin - Install file: sql/pgque.sql -> sql/logres.sql (4770 lines rebuilt via build/transform.sh) - Source tree: sql/pgque-api/ -> sql/logres-api/; sql/pgque-additions/ -> sql/logres-additions/ - Uninstall: sql/pgque_uninstall.sql -> sql/logres_uninstall.sql - Tests: test_pgque_* renamed to test_logres_*; every pgque.* call in every test renamed - Build system (build/transform.sh) now rewrites pgq -> logres instead of pgq -> pgque - Client libraries: clients/python/pgque/ -> clients/python/logres/; clients/go/pgque.go -> clients/go/logres.go; package names, module paths, imports renamed across Python / Go / TypeScript - CI (.github/workflows/ci.yml): test DB name and credential env renamed - Docs: every pgque / PgQue in README.md, docs/*.md, blueprints/*.md, CLAUDE.md, NOTICE renamed Preserved (intentionally not renamed): pgq (parent project), pgqd (parent's daemon), PgQ (parent project in prose), pgq/ submodule directory, and the one comment in build/transform.sh that names "pgqueue" as a boundary-case identifier to avoid mangling. Client libraries break against the old schema and vice versa — users upgrading need to upgrade both. ## README clarifications H1 + tagline refactored away from queue framing: - H1: "logres — event log for Postgres" - Tagline: "Zero-bloat event log, PgQ heritage. One SQL file to install, pg_cron to tick." (dropped the "queue" noun) Comparison section's "When to use logres vs. a job queue" subsection replaced with "Log, not task queue (but can serve task-queue workloads)": - Good-fit for log-as-task-queue: per-key ordered processing, high-throughput uniform tasks, replayable pipelines, multi-consumer event streams, event-sourced systems. - Bad-fit: high-variance task duration (head-of-line blocking), per-message retry with backoff and priority, SQS-style visibility timeouts, dynamic load balancing across heterogeneous workers. - For bad-fit: River / graphile-worker / Oban / pgmq / RabbitMQ / ActiveMQ / SQS. The self-qualification line at the top (Kafka log vs ActiveMQ / RabbitMQ task message queue) stays — it is the first-screen version of the same distinction. ## Out of scope for this PR - Repo rename on GitHub (NikolayS/pgque -> NikolayS/logres) — owner action. Once done, existing URLs redirect for 1 year. - Schema-migration helper for existing pgque installs — pre-v0.1, clean reinstall is acceptable. Can add MIGRATION.md later if needed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SPECx.md is the approved v1.1 specification from 2026-04-12 and documents decisions made under the pgque / PgQue identifier. Rewriting it to logres would erase that history and create confusion about what was actually approved when. Restore SPECx.md to the pre-rename content and prepend one blockquote at the top noting the 2026-04-19 rename. Readers see the rename immediately; the historical decisions stay verbatim; schema/role/class names inside the doc read as pgque throughout with the banner telling the reader to mentally translate to logres. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Functional review of #76 caught three classes of residual pgque references that the perl pass 's/pgque/logres/g; s/PgQue/logres/g' did not cover. 1. Capitalized class-name form `Pgque`. Survived in Python / Go / TypeScript client code (class names, type exports, docstrings) and in README client-library snippets that reference those classes. Replaced with `Logres` everywhere it appeared outside blueprints/SPECx.md. 2. All-caps env-var form `PGQUE`. Survived as `PGQUE_TEST_DSN` in the Python pytest conftest and the Go test file. Replaced with `LOGRES_TEST_DSN`. 3. `pgque` inside the compound word `pgqueue`. The substring rewrite turned `"pgqueue"` (a legitimate boundary-case example in a transform.sh comment) into the nonsense string `"logresue"`, which defeated the point of the comment. Restored to `"pgqueue"`. The Python class is now LogresClient (was PgqueClient). The TS types are LogresClient / LogresMessage. The Go code did not expose a Pgque-prefixed exported name; only its env var is touched. Remaining DevRel-review-flagged items (CLAUDE.md Naming Convention section reads awkwardly post-rename, mild prose lowercase issues) deferred to the DevRel review's incoming patch list. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
DevRel review of #76 flagged four concrete things cold readers hit. Two were already resolved by the earlier case-variant commit (the Python / TypeScript class-identifier renames). The remaining four: 1. CLAUDE.md was a sed-residue mess. Line 5 read "logres (logres)"; lines 10-11 both said `logres` — the lowercase/capitalized split from PgQue no longer applies now that the name is always lowercase. Line 88 had `logres-unlogres.sql` from the substring rewrite. Rewrite the Project line, collapse the naming-convention bullets to one, and restore the uninstall filename to the actual path `logres_uninstall.sql`. 2. README.md had a frame contradiction. Line 40 said "zero-bloat queue pattern"; line 61 said "logres gives you queue semantics inside Postgres"; line 95 said "logres is an event/message queue optimized for high-throughput streaming" — and then the new §109 heading said "Log, not task queue." Within 60 lines the reader was told "queue" three times and "log" twice. - Line 40: "zero-bloat event-log pattern" (was "queue pattern"). - Line 61: "event-log semantics" (was "queue semantics"). - Line 95 Category note: "shared event log with per-consumer cursors — a different category (closer to a Kafka topic than to a job queue)." Replaces "event/message queue optimized for high-throughput streaming". 3. README.md §"Log, not task queue" leaned on "per-key ordered processing (partition by key)" as a marquee good-fit case. logres has no partition primitive. Rewrite the bullet to name the actual mechanism: "For per-key ordered processing, use one queue per partition key — each queue is already a FIFO log for its events (logres has no native partition primitive; the mechanism is multi-queue)." Also fix the "head-of-lines the partition" follow-up → "head-of-lines whichever queue it is in." 4. blueprints/SPECx.md rename banner used to link only README.md and PHASES.md. DevRel asked for a docs/reference.md link too since a reader hitting SPECx from a deep link wants the current SQL surface names without leaving the spec. Added. Deferred: the remaining DevRel LOW / nit items (docs/benchmarks.md "queue-heavy workloads", SPECx per-section reminder notes, TypeScript package name shape). These are tone-level and can land in a separate follow-up if worth it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous rename fix commit (5dad160) aimed at four DevRel findings but CLAUDE.md edits were dropped due to a concurrent-modification error. Retry: - Line 5-6: rewrite the "Project" paragraph. Old: "logres (logres) -- PgQ Universal Edition. Zero-bloat PostgreSQL queue repackaged..." (tautology + outdated "queue" frame). New: "logres -- zero-bloat event log for Postgres, derived from PgQ (Skype)...". - Lines 8-12: collapse "Naming Convention" section. Old: `logres` listed on both "lowercase" and "capitalized form" lines (sed artifact from PgQue / pgque split that no longer applies). New: one bullet, "always lowercase", matching pg_cron / pgmq convention. - Line 87: `logres-unlogres.sql` (substring-mangled from `pgque-unpgque.sql`) -> `logres_uninstall.sql` (actual filename). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
From the HN thread on the prior PgQue release:
The commenter is right. What ships is an append-only event log with per-consumer cursors and native fan-out — a Kafka topic shape, not an ActiveMQ / RabbitMQ / SQS task-queue shape. The old name was sending the wrong mental model at first read.
New name:
logres. Short, nopg_prefix (avoids extension confusion), zero collision with Postgres built-ins, evokes log directly.(Supersedes #74, which proposed
pg_currentand got tangled with Postgres built-ins likepg_current_xact_id,pg_current_snapshot,pg_current_logfile, etc.)Rename
Project identifier
pgque/PgQue→logreseverywhere (92 files, mechanical):pgque.*in SQL →logres.*.pgque_reader/pgque_writer/pgque_admin→logres_reader/logres_writer/logres_admin.sql/pgque.sql→sql/logres.sql(4770 lines rebuilt viabuild/transform.sh).sql/pgque-api/→sql/logres-api/;sql/pgque-additions/→sql/logres-additions/.test_pgque_*→test_logres_*; everypgque.*call renamed.build/transform.shnow rewritespgq→logresinstead ofpgq→pgque.clients/python/pgque/→clients/python/logres/;clients/go/pgque.go→clients/go/logres.go; package names, module paths, imports renamed across Python / Go / TypeScript..github/workflows/ci.ymltest DB name and credential env renamed.pgque/PgQueinREADME.md,docs/*.md,blueprints/*.md,CLAUDE.md,NOTICErenamed.Preserved intentionally:
pgq(parent project),pgqd(parent's daemon),PgQ(prose),pgq/submodule, and the onebuild/transform.shcomment that namespgqueueas a boundary-case identifier to avoid mangling.Client / schema compatibility: old pgque clients break against new logres schema and vice versa. Users upgrading need both sides.
README clarifications
H1 + tagline
pg_cronto tick." (dropped the "queue" noun)§Comparison subsection
"When to use logres vs. a job queue" replaced with "Log, not task queue (but can serve task-queue workloads)":
The first-screen self-qualification line ("closer to Kafka (log) than to ActiveMQ or RabbitMQ (task message queue)") stays — that's the one-sentence version of the same distinction.
Out of scope
NikolayS/pgque→NikolayS/logresis owner action. Existing URLs redirect for 1 year after.MIGRATION.mdcan land if/when a published pgque v0.1 exists in the wild.Test plan
build/transform.shassemblessql/logres.sqlcleanly; all checks pass.pgque/PgQuestrings remain (except the boundary-case comment intransform.sh).logres_test+ everylogres.*call in every test.tests/acceptance/) runs green.🤖 Generated with Claude Code