Skip to content

Background sweeps error repeatedly for tenant 'registry-platform' (missing/incomplete schema) #265

@perigrin

Description

@perigrin

Production worker logs (every ~10 minutes, observed 2026-06-10):

ProcessWaitlist failed for tenant registry-platform: DBD::Pg::st execute failed: ERROR: relation "enrollments" does not exist
WaitlistExpiration failed for tenant registry-platform: DBD::Pg::st execute failed: ERROR: relation "waitlist" does not exist

The tenant-aware sweeps (#240/#261) iterate registry.tenants and connect_schema per slug. A row with slug registry-platform exists whose Postgres schema is missing or incomplete, so every sweep errors for it. The per-tenant try/catch isolates it correctly (other tenants unaffected), but it's error-level log noise on a 10-minute cadence.

Investigate:

  1. What is the registry-platform row — a seed/placeholder, or a half-provisioned tenant? If it's not a real tenant, delete the row.
  2. If rows-without-schemas are a legitimate state, the sweeps should skip non-existent schemas up front (the migrations' to_regnamespace(quote_ident(slug)) IS NULL guard pattern, demoting to a single warn) instead of erroring per run.

Found while watching the post-#264 deploy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend/server-side developmentbugSomething isn't workinglowLow complexity implementationlow-impactLow business impact

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions