toastinfo
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
toastinfo | 1.7 | STAT | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 6530 | toastinfo | No | Yes | No | Yes | No | Yes | - |
| Related | pg_buffercache pageinspect pagevis pg_freespacemap pg_visibility pgstattuple pgfincore pgcozy pg_prewarm |
|---|
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | MIXED | 1.7 | 1817161514 | toastinfo | - |
| RPM | PIGSTY | 1.7 | 1817161514 | toastinfo_$v | - |
| DEB | PGDG | 1.7 | 1817161514 | postgresql-$v-toastinfo | - |
Build
You can build the RPM packages for toastinfo using pig build:
Install
You can install toastinfo directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
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.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)