Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PRAGMA metadata_info that displays info about the storage of metadata, and correctly write free metadata blocks #8956

Merged
merged 8 commits into from
Sep 16, 2023

Conversation

Mytherin
Copy link
Collaborator

This PR adds the PRAGMA metadata_info command that can be used to query information about the metadata manager:

D PRAGMA metadata_info;
┌──────────┬──────────────┬─────────────┬────────────────────────────────────────────┐
│ block_id │ total_blocks │ free_blocks │                 free_list                  │
│  int64   │    int64     │    int64    │                  int64[]                   │
├──────────┼──────────────┼─────────────┼────────────────────────────────────────────┤
│        06461 │ [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14…  │
└──────────┴──────────────┴─────────────┴────────────────────────────────────────────┘

In addition, this PR fixes an issue found in #8943 where the free list of the metadata manager was not correctly serialized causing small leaking of storage space for every database restart.

@Mytherin Mytherin merged commit 53dc13d into duckdb:main Sep 16, 2023
48 checks passed
@Mytherin Mytherin deleted the metadatarewrite branch December 4, 2023 11:45
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.

None yet

1 participant