feat: PG VACUUM/ANALYZE on every Optimize call - BED-9161 - #112
Conversation
WalkthroughPostgreSQL storage optimization now vacuums both ChangesPostgreSQL vacuum behavior
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
drivers/pg/optimize_test.go (1)
13-21: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winRetain coverage for
Execfailures.This subtest verifies only successful execution. Add a separate
ExpectExec(...).WillReturnError(...)case and assert thatoptimizeStoragereturns the error. If another test already covers this path, verify that it remains after removing the statistics-query tests.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@drivers/pg/optimize_test.go` around lines 13 - 21, Add a separate failure subtest alongside “always vacuums node and edge” that configures the mock connection’s Exec expectation to return an error, then assert optimizeStorage propagates that error and all mock expectations are met. Preserve or verify equivalent existing coverage if statistics-query tests are removed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@drivers/pg/optimize_test.go`:
- Around line 13-21: Add a separate failure subtest alongside “always vacuums
node and edge” that configures the mock connection’s Exec expectation to return
an error, then assert optimizeStorage propagates that error and all mock
expectations are met. Preserve or verify equivalent existing coverage if
statistics-query tests are removed.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1ffaab47-2bae-493b-a1fa-b579ed071d2a
📒 Files selected for processing (2)
drivers/pg/optimize.godrivers/pg/optimize_test.go
💤 Files with no reviewable changes (1)
- drivers/pg/optimize.go
Description
Removes the thresholds from PG's Optimize function for VACUUM/ANALYZE. This will insure the DB always has updated statistics.
Resolves: BED-9161
Type of Change
Testing
make test_allwithCONNECTION_STRINGset)Screenshots (if appropriate):
Driver Impact
drivers/pg)drivers/neo4j)Checklist
go.mod/go.sumare up to date if dependencies changedSummary by CodeRabbit