Hi Kirill,
> Please find two patches that would be very helpful to my own use
> cases, and I believe they are universally useful. v1-0001 provides
> pretty-print functionality for bt_page_items().
> This makes much easier to get which exactly data page contains
I did a quick look at 0001. Here are my two cents.
If you are changing bt_page_items() you should also update the
documentation [1] and cover the new functionality with tests.
Adding a new required argument to the existing function doesn't strike
me as a great idea. That's an API change which is arguably not that
necessary. On top of that, pretty-printing potentially corrupted data
may cause the backend to crash. IMO if we are going to do this the API
should be very clear about the danger. I would prefer having a
separate function, e.g. bt_page_items_unsafe. Or maybe this is
something better done with an external tool like pg_filedump.
Just thinking out loud. I wonder what other people think.
[1]: https://www.postgresql.org/docs/current/pageinspect.html
--
Best regards,
Aleksander Alekseev