# Pocket tools

Small calculators for what PostgreSQL prints, each worked out the way the server works it out and tested against its output.

> Canonical URL: https://sudohulk.com/tools
> PostgreSQL: 18.3
> Author: Vignesh Kumar A <vignesh@sudohulk.com>
> Licence: CC BY 4.0. Quote freely, cite the canonical URL.

---

- [LSN to WAL file](https://sudohulk.com/tools/lsn.md): Which WAL segment file holds an LSN, and how many bytes into it. Agrees with `pg_walfile_name_offset()`. WebMCP tool: `lsn_to_wal_file`.
- [Infomask decoder](https://sudohulk.com/tools/infomask.md): The flags in a heap tuple’s t_infomask and t_infomask2, as pageinspect’s heap_page_items() prints them. Agrees with `heap_tuple_infomask_flags()`. WebMCP tool: `decode_infomask`.

In a browser that supports WebMCP, every page of the site offers the tools to an agent by those names; they only read.
