Implement Postgres interpreter for ConversationStore#4764
Merged
akshaymankar merged 87 commits intodevelopfrom Oct 13, 2025
Merged
Implement Postgres interpreter for ConversationStore#4764akshaymankar merged 87 commits intodevelopfrom
akshaymankar merged 87 commits intodevelopfrom
Conversation
9b41958 to
3f46a4d
Compare
53b1c71 to
648ce9c
Compare
fa80140 to
7d4af0f
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements a PostgreSQL interpreter for ConversationStore, enabling conversation data to be stored in PostgreSQL instead of Cassandra. The purpose is to provide an alternative data storage backend for conversation-related operations while maintaining compatibility with the existing Cassandra implementation.
Key changes include:
- Implementation of a complete PostgreSQL interpreter for
ConversationStoreoperations - Addition of new configuration options to control storage location (Cassandra vs PostgreSQL)
- Removal of deprecated Cassandra-only functionality and code cleanup
Reviewed Changes
Copilot reviewed 61 out of 61 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
libs/wire-subsystems/src/Wire/ConversationStore/Postgres.hs |
New 1,228-line PostgreSQL interpreter implementation for ConversationStore |
services/galley/src/Galley/Options.hs |
Added PostgresMigrationOpts configuration and StorageLocation enum |
services/galley/src/Galley/App.hs |
Integrated PostgreSQL interpreter selection based on configuration |
libs/wire-subsystems/src/Wire/ConversationStore.hs |
Refactored interface to separate MLSCommitLockStore and update method signatures |
| Multiple test files | Updated test code to work with the new conversation store interface |
| Multiple API files | Added PostgreSQL marshalling instances for various data types |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
fisx
approved these changes
Oct 6, 2025
Contributor
fisx
left a comment
There was a problem hiding this comment.
looks nice :-)! hope i didn't leave too many comments. i'm not feeling strongly about most of them.
9af8b8d to
ef4193f
Compare
This will allow us to migrate rest of the conversation data to postgres
Also change the Postgres interpreter to do so. In the galley code, this is explicitly being used as an Upsert.
This replaces the use of ListItems.
The pagination can be done with a UNION query (and not a join as the comment suggests), but it causes weird problems due to domain being NULL. We could send the local domain in to always get the domain, but this just causes more work for Postgres. Its probably more efficient to keep what we have.
…eries Its too difficult to do this one, perhaps its ok to send one query per remote domain.
This replaces the use of ListItems with LegacyPaging
…me order as the conv ids
…m /converstions/list-ids
This reverts commit f81eead.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Matthias Fischmann <mf@zerobuzz.net>
7bd863e to
1be7f26
Compare
2 tasks
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-19086
Checklist
changelog.d