MP077WARNINGFree
prefer-lz4-toast-compression
What It Detects
Use lz4 TOAST compression instead of pglz on PostgreSQL 14+ for better performance.
Why It's Dangerous
PostgreSQL 14 introduced lz4 as an alternative TOAST compression method. lz4 is 3-5x faster for both compression and decompression compared to pglz, with only slightly worse compression ratios.
Bad Example
ALTER TABLE users ALTER COLUMN bio SET COMPRESSION pglz;
Good Example
ALTER TABLE users ALTER COLUMN bio SET COMPRESSION lz4;
Configuration
Disable this rule:
# .migrationpilotrc.yml rules: MP077: false
Or change its severity:
# .migrationpilotrc.yml
rules:
MP077:
severity: warning