This Rust tool is a port of the python tool - pageinspect_inspector
tool by Louise Grandjonc.
It allows you to inspect and analyze the internal structure of PostgreSQL indexes, highlighting page layout and tuples and in my opinion, it's a pretty cool project to work on :D
This tool currently only supports btree indexes. (Support GIN indexes planned later on). It leverages handlebars
for visualization of the trees with minor tweaks from original
python project.
- Install
pageinspect
extension in your database. - Clone the repository and run
cargo run --release -- -o <output-path-for-html> -i <index-name> -u <postgres-user>
- You can run
cargo run --release -- --help
for more flags.
- The tool currently only supports btree indexes.
- This tool's UI could use some bug fixes. (PRs are welcome)
- With large indexes, the tool might take a while to generate the output (imagine ~1 min), and dynamic rendering of lines might break the UI.