Repository navigation
Conversation
… and stop rewriting page 1 at connect
…ff the calling thread
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 release significantly improves database performance, upgrade reliability, and indexing behavior by addressing long-standing issues with planner statistics, introducing deferred optimization, and refining connection management.
Key Improvements:
autoOptimizeconstructor parameter (defaulttrue) andOptimize()/OptimizeAsync()methods. This allows developers to defer time-consuming one-time upgrade tasks (like dropping redundant 4.x indexes, rebuilding partially indexed ones, and compacting the database) to a background thread, preventing UI freezes on app launch.CreateIndexnow intelligently detects and rebuilds indexes when their DDL definition mismatches, rather than silently keeping stale 4.x indexes. It also correctly drops orphaned legacy indexes from 4.x rollbacks, improving query efficiency and reducing write overhead.Cleanup(vacuum: true)andOptimize()methods now use a more robustVACUUM INTOstrategy. This compacts the database by writing a single copy to a temporary file and atomically swapping it, significantly reducing the required free disk space compared to a fullVACUUMand handling interruptions gracefully.Connect,Disconnect,Dispose, andBackupnow acquire the connection gate, ensuring they run serially and prevent race conditions that could lead to connection issues or file locks.rebuildCacheis enabled), preventing issues where subsequent operations might incorrectly target a deleted file.