Skip to content

v1.1.1

Choose a tag to compare

@janbjorge janbjorge released this 07 Jul 13:02
9b6f9cc

PgQueuer v1.1.1

Widens the id primary keys on queue, statistics, and schedules from
int4 to BIGINT (#676, closes #671).

Fixes

  • id columns widened to BIGINT: the queue, statistics, and
    schedules primary keys were int4 SERIAL, capped at ~2.1 billion. The
    sequence never reuses values, so a long-lived deployment could exhaust it and
    fail every enqueue. Fresh installs now use BIGSERIAL. pgq upgrade widens
    existing int4 columns and their sequences to BIGINT in place. The
    migration is idempotent (guarded on column/sequence type) and safe to re-run.

Upgrade notes

⚠️ This migration takes an ACCESS EXCLUSIVE lock. Widening int4 to
BIGINT rewrites the table and rebuilds its indexes, blocking enqueues,
dequeues, and SELECTs until it finishes. Time scales with row count; on a
large or bloated queue this can stall the queue for seconds to minutes.

  • Run pgq upgrade during a maintenance window or low-traffic period, or
  • Run pgq upgrade --no-widen-id to apply the other migrations and skip the
    widen, then widen out-of-band.

For a zero-downtime widen on a large table, see #671
and the postgres.ai runbook How to redefine a PK without
downtime
.

Full Changelog: v1.1.0...v1.1.1