Skip to content

Show used vs file size in Lite status bar#517

Merged
erikdarlingdata merged 1 commit intodevfrom
fix/duckdb-used-size-status-bar
Mar 11, 2026
Merged

Show used vs file size in Lite status bar#517
erikdarlingdata merged 1 commit intodevfrom
fix/duckdb-used-size-status-bar

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

  • DuckDB 1.5.0's free block reuse means the file size on disk stays frozen (~424 MB) even as data grows inside
  • GetDatabaseSizeMb() reports file size, so the status bar showed a misleading static number
  • New GetUsedDataSizeMb() queries pragma_database_size() for actual used blocks
  • Status bar now shows Database: 175.5 / 423.8 MB (used / file size)
  • Falls back to file-size-only display if the pragma query fails

Test plan

  • Verified status bar shows used / file format after restart
  • Confirmed pragma_database_size() returns correct used_blocks (702 of 1774)
  • Build succeeds with zero errors
  • No errors in Lite logs after restart

🤖 Generated with Claude Code

GetDatabaseSizeMb() reports file size on disk, which stays frozen when
DuckDB 1.5.0 reuses free blocks. New GetUsedDataSizeMb() queries
pragma_database_size() for actual used blocks. Status bar now shows
"Database: 175.5 / 423.8 MB" (used / file).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 4e783a6 into dev Mar 11, 2026
3 checks passed
@erikdarlingdata erikdarlingdata deleted the fix/duckdb-used-size-status-bar branch April 9, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant