• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / auth / 19428985132

17 Nov 2025 12:05PM UTC coverage: 68.402% (+0.09%) from 68.312%
19428985132

push

github

web-flow
feat: async, concurrent index creation for users table (#2239)

Introduces an asynchronous index worker for creating database indexes in
the background.

- Creates indexes only when
`GOTRUE_INDEX_WORKER_ENSURE_USER_SEARCH_INDEXES_EXIST` is enabled
- Config watcher notifies the worker when the config has changed to
decide whether to create the indexes or not
- Non-blocking index creation via `CONCURRENTLY` and async worker
- Prevents multiple processes from creating indexes simultaneously via
advisory locks
- Handles interruptions (server restarts, connection loss) or
out-of-band index manipulation by checking which indexes failed (invalid
or is not ready) or don't exist and drops/recreates them
- Idempotent: existing indexes are skipped

In the future, these index related migrations might be tracked using a
different tool (e.g.: `goose`/`golang-migrate`) as `pop` does not
support migrations without transactions which makes it unsuitable for
index creation with `CONCURRENTLY`.

ref: AUTH-892

188 of 249 new or added lines in 2 files covered. (75.5%)

1 existing line in 1 file now uncovered.

14192 of 20748 relevant lines covered (68.4%)

78.06 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/internal/api/apiworker/apiworker.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc