[Postgres Storage] Parameter index compacting - #761
Draft
rkistner wants to merge 24 commits into
Draft
Conversation
This helps preserve progress when interrupting long-running jobs.
|
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.
This ports #759 to Postgres storage. Postgres storage had no parameter index compacting before, so this adds a new implementation matching the new MongoDB one.
To a large extent this is a direct port of the MongoDB implementation: Postgres uses the same basic storage structure for this as MongoDB v1 storage. This does make the implementation slightly simpler, as we don't have to cater for multiple collections like MongoDB v3 storage.
There are still some notable differences due to how the parameters are read with Postgres:
So overall we do still use the same compact fence implementation, but for a different reason.
Migration
This adds two new fields on the
sync_rulestable, which is a fast migration. This does not touch the potentially largebucket_parameterstable.Status & AI Usage
This is completely ported/vibe-coded using Claude Opus 5.
I have not manually reviewed this yet. The priority right now is to get #759 shipped, but in the meantime this serves to demonstrate we can quickly port the changes afterwards. For this reason I'm not using a pull request stack here.