WPB-28665: add PostGreSQL support for query user search - #5539
Open
blackheaven wants to merge 5 commits into
Open
blackheaven wants to merge 5 commits into
blackheaven wants to merge 5 commits into
Conversation
fisx
reviewed
Sep 14, 2026
fisx
left a comment
Contributor
There was a problem hiding this comment.
This would be awesome, but the ticket doesn't really say anything about re-architecting anything? Also, shouldn't we do some load testing before we merge this? Or maybe after, before the next release?
Contributor
Author
|
@fisx as discussed during the meeting this morning, we are not ready yet for load testing, instead, we should support both for a little while, I'll rework my PR in this direction. |
blackheaven
force-pushed
the
gdifolco/WPB-28655-migrate-user-search-postgresql
branch
from
September 24, 2026 14:38
e2fa56a to
7cd6d34
Compare
…fault, Postgres optional) Rebased onto develop; restores the ElasticSearch stack removed by the original PR. Keeps the UserSearchStore effect with its Postgres interpreter and adds a thin ElasticSearch adapter delegating to IndexedUserStore, so all search reads (local search, team browse, team size, search-visibility) go through one interface. In Postgres mode the ES index write path is neutralized via a no-op IndexedUserStore interpreter; brig's Postgres user store now maintains wire_user.name_normalized on insert/update. brig-index regains the ES tooling plus a new backfill-normalized-names subcommand. ES backend is deprecated; migration steps documented.
blackheaven
force-pushed
the
gdifolco/WPB-28655-migrate-user-search-postgresql
branch
from
September 24, 2026 15:08
7cd6d34 to
6e7477f
Compare
CREATE INDEX CONCURRENTLY cannot run inside a transaction; the migration runner only exempts scripts listed in nonTransactionMigrations. Move the three index statements to their own script registered there, keeping the transactional DDL (ALTER TABLE wire_user, CREATE TABLE team_search_visibility) in the original file. Fixes the brig/galley PostgresMigrationUsageError crashloop in the integration environment.
Hasql.Session.script sends a whole script as one simple-query message, and Postgres runs multiple statements of one message in a single implicit transaction - so a script containing several CREATE INDEX CONCURRENTLY statements still fails with SQLSTATE 25001 even on the non-transactional path. Split the user-search index migration into three single-statement scripts, all registered in nonTransactionMigrations.
This branch has not been deployed
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.
https://wearezeta.atlassian.net/browse/WPB-28665
Checklist
changelog.d