toastinfo
show details on toasted datums
toastinfo : show details on toasted datums
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 6530 | toastinfo | toastinfo | 1.7 |
STAT | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-r | No | Yes | No | Yes | yes | no |
| Relationships | |
|---|---|
| See Also | pg_buffercache pageinspect pagevis pg_freespacemap pg_visibility pgstattuple pgfincore pgcozy pg_prewarm |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | MIXED | 1.7 |
18 17 16 15 14 | toastinfo |
- |
| RPM | PIGSTY | 1.7 |
18 17 16 15 14 | toastinfo_$v |
- |
| DEB | PGDG | 1.7 |
18 17 16 15 14 | postgresql-$v-toastinfo |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| el8.aarch64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| el9.x86_64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| el9.aarch64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| el10.x86_64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| el10.aarch64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| d12.x86_64 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 |
| d12.aarch64 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 |
| d13.x86_64 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 |
| d13.aarch64 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 |
| u22.x86_64 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 |
| u22.aarch64 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 |
| u24.x86_64 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 |
| u24.aarch64 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 |
| u26.x86_64 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 |
| u26.aarch64 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 | PGDG 1.7 |
Source
github.com/df7cb/toastinfo
toastinfo-1.7.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources: upstream README, upstream tags.
toastinfo exposes how PostgreSQL stores variable-length (varlena) values, including inline, compressed, and out-of-line TOAST storage forms.
Functions
pg_toastinfo(anyelement) describes the storage form of a datum:
Possible storage forms include:
null, for NULL values.ordinary, for non-varlena data types.short inline varlena, up to 126 bytes with a 1-byte header.long inline varlena, uncompressed, up to 1 GiB with a 4-byte header.long inline varlena, compressed (pglz|lz4).toasted varlena, uncompressed.toasted varlena, compressed (pglz|lz4).
Compressed varlenas show the compression method on PostgreSQL 14+.
pg_toastpointer(anyelement) returns the TOAST table chunk_id OID for out-of-line toasted values, or NULL for non-toasted input:
Storage Example
Caveats
- Pigsty metadata carries
toastinfo1.6 for PostgreSQL 14-18, with Pigsty RPMs and PGDG DEBs. - The upstream GitHub README documents the same SQL surface, but the public GitHub tags visible during review stop at
v1.5; no upstream 1.6 changelog was found in that repository. pg_toastpointeris meaningful only for out-of-line toasted data; ordinary, inline, or NULL values return NULL.