![]() For example, support for additional index access methods would be nice. I welcome pull requests from users that want to expand pg_hexedit. I hope that pg_hexedit will be useful to users or aspiring hackers that want to understand how PostgreSQL works from the ground up. Anything that helps to demystify the internals of Postgres seems like a good thing to me. I eventually realized that pg_hexedit is also broadly useful as an educational tool, and decided to make it available as an open source project. "cities" nbtree page, starting with ItemId array (shown as blue tags) The subtle details of how free space is managed within a single page can matter. In short, pageinspect functions show "what tuples are on the page" logically, as well as the physical contents of individual tuples, but the exact physical state of the entire page is obscured, in order to support an item-pointer-wise SQL interface. Tools like contrib/pageinspect are great, but they are still somewhat interpretive, which can actually be a hindrance for this kind of work. Simulating and testing novel corruption scenarios became significantly easier with pg_hexedit. I was working on corruption detection, and it became clear that a tool like this would help with corruption simulation/white-box testing, something that I've spent rather a lot of time on. I originally wrote the tool in order to meet my own needs in this area. Pg_type catalog table opened in wxHexeditor, with annotations ![]() WxHexeditor and pg_hexedit together show information about each individual field in an interactive, easy to use way: Use of the tool should be limited to throwaway installations on users' personal machines. Opening a Postgres relation file in a hex editor while the server is running is a fundamentally unsafe thing to do if you care about your data. Since it's an experimental tool that is primarily made available for educational purposes, you are well advised to not use it on any data directory that isn't entirely disposable. Pg_hexedit is built on top of the open source, cross-platform GUI hex editor wxHeċditor. This tool is called pg_hexedit, and is available from: I've written an experimental tool for presenting PostgreSQL relation files in a hex editor with annotations/tags and tooltips that show the structure of the data and its content, including bit field values.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |