github pthm/melange v0.7.2
Melange v0.7.2

latest releases: cmd/melange/v0.7.4, v0.7.4, melange/v0.7.4...
10 days ago

Adds performance linting to melange doctor and fixes two bugs reported by community contributors.

No breaking changes from v0.7.1. Upgrade and run melange migrate to pick up fixes.

Performance Linting in melange doctor

The doctor command now detects missing expression indexes for ::text casts in the melange_tuples view — the #1 production performance
issue, causing 26x slower queries at 1M tuples.

  • Parses view definition via pg_get_viewdef() to detect UNION vs UNION ALL and enumerate source tables
  • Detects missing ::text expression indexes per source table with severity based on row count and exact CREATE INDEX fix hints
  • Disable via --skip-performance flag or doctor.skip_performance config

Bug Fixes

  • Fix list_objects missing results for closure userset patterns (#30) — list_*_objects
    only expanded userset lookups for the first relation in a closure. When multiple relations shared the same userset pattern, only one got SQL
    expansion. Thanks to @jtbeach for the fix.

  • Fix uppercase relation names breaking re-migration (#26) — Schemas with uppercase relation
    names caused functions to be dropped on re-migration due to a casing mismatch between CollectFunctionNames and PostgreSQL's identifier
    folding. Thanks to @Desuuuu for reporting and submitting an initial fix
    (#27).

Contributors

Don't miss a new melange release

NewReleases is sending notifications on new releases.