pagevis

pagevis

pagevis : Visualise database pages in ascii code

Overview

ID Extension Package Version Category License Language
6860
pagevis
pagevis
0.1
STAT
MIT
SQL
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
----d-r
No
No
No
Yes
yes
no
Relationships
See Also
pageinspect
pg_visibility
amcheck
pg_surgery
pgstattuple
pg_dirtyread
toastinfo
pg_profile

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT
PIGSTY
0.1
18
17
16
15
14
pagevis -
RPM
PIGSTY
0.1
18
17
16
15
14
pagevis_$v -
DEB
PIGSTY
0.1
18
17
16
15
14
postgresql-$v-pagevis -
Linux / PG PG18 PG17 PG16 PG15 PG14
el8.x86_64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
el8.aarch64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
el9.x86_64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
el9.aarch64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
el10.x86_64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
el10.aarch64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
d12.x86_64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
d12.aarch64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
d13.x86_64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
d13.aarch64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
u22.x86_64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
u22.aarch64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
u24.x86_64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
u24.aarch64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
Package Version OS ORG SIZE File URL
pagevis_18 0.1 el8.x86_64 pigsty 8.1 KiB pagevis_18-0.1-1PIGSTY.el8.x86_64.rpm
pagevis_18 0.1 el8.aarch64 pigsty 8.1 KiB pagevis_18-0.1-1PIGSTY.el8.aarch64.rpm
pagevis_18 0.1 el9.x86_64 pigsty 8.2 KiB pagevis_18-0.1-1PIGSTY.el9.x86_64.rpm
pagevis_18 0.1 el9.aarch64 pigsty 8.1 KiB pagevis_18-0.1-1PIGSTY.el9.aarch64.rpm
pagevis_18 0.1 el10.x86_64 pigsty 8.2 KiB pagevis_18-0.1-1PIGSTY.el10.x86_64.rpm
pagevis_18 0.1 el10.aarch64 pigsty 8.2 KiB pagevis_18-0.1-1PIGSTY.el10.aarch64.rpm
postgresql-18-pagevis 0.1 d12.x86_64 pigsty 5.2 KiB postgresql-18-pagevis_0.1-1PIGSTY~bookworm_amd64.deb
postgresql-18-pagevis 0.1 d12.aarch64 pigsty 5.2 KiB postgresql-18-pagevis_0.1-1PIGSTY~bookworm_arm64.deb
postgresql-18-pagevis 0.1 d13.x86_64 pigsty 5.2 KiB postgresql-18-pagevis_0.1-1PIGSTY~trixie_amd64.deb
postgresql-18-pagevis 0.1 d13.aarch64 pigsty 5.2 KiB postgresql-18-pagevis_0.1-1PIGSTY~trixie_arm64.deb
postgresql-18-pagevis 0.1 u22.x86_64 pigsty 5.2 KiB postgresql-18-pagevis_0.1-1PIGSTY~jammy_amd64.deb
postgresql-18-pagevis 0.1 u22.aarch64 pigsty 5.2 KiB postgresql-18-pagevis_0.1-1PIGSTY~jammy_arm64.deb
postgresql-18-pagevis 0.1 u24.x86_64 pigsty 5.2 KiB postgresql-18-pagevis_0.1-1PIGSTY~noble_amd64.deb
postgresql-18-pagevis 0.1 u24.aarch64 pigsty 5.2 KiB postgresql-18-pagevis_0.1-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
pagevis_17 0.1 el8.x86_64 pigsty 8.1 KiB pagevis_17-0.1-1PIGSTY.el8.x86_64.rpm
pagevis_17 0.1 el8.aarch64 pigsty 8.1 KiB pagevis_17-0.1-1PIGSTY.el8.aarch64.rpm
pagevis_17 0.1 el9.x86_64 pigsty 8.2 KiB pagevis_17-0.1-1PIGSTY.el9.x86_64.rpm
pagevis_17 0.1 el9.aarch64 pigsty 8.1 KiB pagevis_17-0.1-1PIGSTY.el9.aarch64.rpm
pagevis_17 0.1 el10.x86_64 pigsty 8.2 KiB pagevis_17-0.1-1PIGSTY.el10.x86_64.rpm
pagevis_17 0.1 el10.aarch64 pigsty 8.2 KiB pagevis_17-0.1-1PIGSTY.el10.aarch64.rpm
postgresql-17-pagevis 0.1 d12.x86_64 pigsty 5.2 KiB postgresql-17-pagevis_0.1-1PIGSTY~bookworm_amd64.deb
postgresql-17-pagevis 0.1 d12.aarch64 pigsty 5.2 KiB postgresql-17-pagevis_0.1-1PIGSTY~bookworm_arm64.deb
postgresql-17-pagevis 0.1 d13.x86_64 pigsty 5.2 KiB postgresql-17-pagevis_0.1-1PIGSTY~trixie_amd64.deb
postgresql-17-pagevis 0.1 d13.aarch64 pigsty 5.2 KiB postgresql-17-pagevis_0.1-1PIGSTY~trixie_arm64.deb
postgresql-17-pagevis 0.1 u22.x86_64 pigsty 5.2 KiB postgresql-17-pagevis_0.1-1PIGSTY~jammy_amd64.deb
postgresql-17-pagevis 0.1 u22.aarch64 pigsty 5.2 KiB postgresql-17-pagevis_0.1-1PIGSTY~jammy_arm64.deb
postgresql-17-pagevis 0.1 u24.x86_64 pigsty 5.2 KiB postgresql-17-pagevis_0.1-1PIGSTY~noble_amd64.deb
postgresql-17-pagevis 0.1 u24.aarch64 pigsty 5.2 KiB postgresql-17-pagevis_0.1-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
pagevis_16 0.1 el8.x86_64 pigsty 8.1 KiB pagevis_16-0.1-1PIGSTY.el8.x86_64.rpm
pagevis_16 0.1 el8.aarch64 pigsty 8.1 KiB pagevis_16-0.1-1PIGSTY.el8.aarch64.rpm
pagevis_16 0.1 el9.x86_64 pigsty 8.2 KiB pagevis_16-0.1-1PIGSTY.el9.x86_64.rpm
pagevis_16 0.1 el9.aarch64 pigsty 8.1 KiB pagevis_16-0.1-1PIGSTY.el9.aarch64.rpm
pagevis_16 0.1 el10.x86_64 pigsty 8.2 KiB pagevis_16-0.1-1PIGSTY.el10.x86_64.rpm
pagevis_16 0.1 el10.aarch64 pigsty 8.2 KiB pagevis_16-0.1-1PIGSTY.el10.aarch64.rpm
postgresql-16-pagevis 0.1 d12.x86_64 pigsty 5.2 KiB postgresql-16-pagevis_0.1-1PIGSTY~bookworm_amd64.deb
postgresql-16-pagevis 0.1 d12.aarch64 pigsty 5.2 KiB postgresql-16-pagevis_0.1-1PIGSTY~bookworm_arm64.deb
postgresql-16-pagevis 0.1 d13.x86_64 pigsty 5.2 KiB postgresql-16-pagevis_0.1-1PIGSTY~trixie_amd64.deb
postgresql-16-pagevis 0.1 d13.aarch64 pigsty 5.2 KiB postgresql-16-pagevis_0.1-1PIGSTY~trixie_arm64.deb
postgresql-16-pagevis 0.1 u22.x86_64 pigsty 5.2 KiB postgresql-16-pagevis_0.1-1PIGSTY~jammy_amd64.deb
postgresql-16-pagevis 0.1 u22.aarch64 pigsty 5.2 KiB postgresql-16-pagevis_0.1-1PIGSTY~jammy_arm64.deb
postgresql-16-pagevis 0.1 u24.x86_64 pigsty 5.2 KiB postgresql-16-pagevis_0.1-1PIGSTY~noble_amd64.deb
postgresql-16-pagevis 0.1 u24.aarch64 pigsty 5.2 KiB postgresql-16-pagevis_0.1-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
pagevis_15 0.1 el8.x86_64 pigsty 8.1 KiB pagevis_15-0.1-1PIGSTY.el8.x86_64.rpm
pagevis_15 0.1 el8.aarch64 pigsty 8.1 KiB pagevis_15-0.1-1PIGSTY.el8.aarch64.rpm
pagevis_15 0.1 el9.x86_64 pigsty 8.2 KiB pagevis_15-0.1-1PIGSTY.el9.x86_64.rpm
pagevis_15 0.1 el9.aarch64 pigsty 8.1 KiB pagevis_15-0.1-1PIGSTY.el9.aarch64.rpm
pagevis_15 0.1 el10.x86_64 pigsty 8.2 KiB pagevis_15-0.1-1PIGSTY.el10.x86_64.rpm
pagevis_15 0.1 el10.aarch64 pigsty 8.2 KiB pagevis_15-0.1-1PIGSTY.el10.aarch64.rpm
postgresql-15-pagevis 0.1 d12.x86_64 pigsty 5.2 KiB postgresql-15-pagevis_0.1-1PIGSTY~bookworm_amd64.deb
postgresql-15-pagevis 0.1 d12.aarch64 pigsty 5.2 KiB postgresql-15-pagevis_0.1-1PIGSTY~bookworm_arm64.deb
postgresql-15-pagevis 0.1 d13.x86_64 pigsty 5.2 KiB postgresql-15-pagevis_0.1-1PIGSTY~trixie_amd64.deb
postgresql-15-pagevis 0.1 d13.aarch64 pigsty 5.2 KiB postgresql-15-pagevis_0.1-1PIGSTY~trixie_arm64.deb
postgresql-15-pagevis 0.1 u22.x86_64 pigsty 5.2 KiB postgresql-15-pagevis_0.1-1PIGSTY~jammy_amd64.deb
postgresql-15-pagevis 0.1 u22.aarch64 pigsty 5.2 KiB postgresql-15-pagevis_0.1-1PIGSTY~jammy_arm64.deb
postgresql-15-pagevis 0.1 u24.x86_64 pigsty 5.2 KiB postgresql-15-pagevis_0.1-1PIGSTY~noble_amd64.deb
postgresql-15-pagevis 0.1 u24.aarch64 pigsty 5.2 KiB postgresql-15-pagevis_0.1-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
pagevis_14 0.1 el8.x86_64 pigsty 8.1 KiB pagevis_14-0.1-1PIGSTY.el8.x86_64.rpm
pagevis_14 0.1 el8.aarch64 pigsty 8.1 KiB pagevis_14-0.1-1PIGSTY.el8.aarch64.rpm
pagevis_14 0.1 el9.x86_64 pigsty 8.2 KiB pagevis_14-0.1-1PIGSTY.el9.x86_64.rpm
pagevis_14 0.1 el9.aarch64 pigsty 8.1 KiB pagevis_14-0.1-1PIGSTY.el9.aarch64.rpm
pagevis_14 0.1 el10.x86_64 pigsty 8.2 KiB pagevis_14-0.1-1PIGSTY.el10.x86_64.rpm
pagevis_14 0.1 el10.aarch64 pigsty 8.2 KiB pagevis_14-0.1-1PIGSTY.el10.aarch64.rpm
postgresql-14-pagevis 0.1 d12.x86_64 pigsty 5.2 KiB postgresql-14-pagevis_0.1-1PIGSTY~bookworm_amd64.deb
postgresql-14-pagevis 0.1 d12.aarch64 pigsty 5.2 KiB postgresql-14-pagevis_0.1-1PIGSTY~bookworm_arm64.deb
postgresql-14-pagevis 0.1 d13.x86_64 pigsty 5.2 KiB postgresql-14-pagevis_0.1-1PIGSTY~trixie_amd64.deb
postgresql-14-pagevis 0.1 d13.aarch64 pigsty 5.2 KiB postgresql-14-pagevis_0.1-1PIGSTY~trixie_arm64.deb
postgresql-14-pagevis 0.1 u22.x86_64 pigsty 5.2 KiB postgresql-14-pagevis_0.1-1PIGSTY~jammy_amd64.deb
postgresql-14-pagevis 0.1 u22.aarch64 pigsty 5.2 KiB postgresql-14-pagevis_0.1-1PIGSTY~jammy_arm64.deb
postgresql-14-pagevis 0.1 u24.x86_64 pigsty 5.2 KiB postgresql-14-pagevis_0.1-1PIGSTY~noble_amd64.deb
postgresql-14-pagevis 0.1 u24.aarch64 pigsty 5.2 KiB postgresql-14-pagevis_0.1-1PIGSTY~noble_arm64.deb

Source

pig build pkg pagevis;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install pagevis;		# install via package name, for the active PG version

pig install pagevis -v 18;   # install for PG 18
pig install pagevis -v 17;   # install for PG 17
pig install pagevis -v 16;   # install for PG 16
pig install pagevis -v 15;   # install for PG 15
pig install pagevis -v 14;   # install for PG 14

Create this extension with:

CREATE EXTENSION pagevis;

Usage

pagevis: ASCII visualization of PostgreSQL database pages

pagevis provides an ASCII-graphical representation of the contents of a PostgreSQL database page. It requires the pageinspect extension.

Function

-- show_page(relation, block_number, line_width)
SELECT show_page('my_table', 0, 64);

Output Characters

Character Meaning
P Page header
U Unused line pointer
N Normal line pointer
R Redirect line pointer
D Dead line pointer
(space) Free space (the “hole”)
[n] Tuple number (overlaid on tuple header)
H Tuple header
# Tuple data
- Tuple invisible to current transaction (dead)
. Inter-tuple padding

Example

SELECT show_page('pvtest', 0, 64);
                             show_page
------------------------------------------------------------------
 PPPPPPPPPPPPPPPPPPPPPPPP001N002N003N004N005N006N007N008N009N010N
 011N012N013N014N015N016N017N018N019N020N...

 [226]HHHHHHHHHHHHHHHHHHH####....[225]HHHHHHHHHHHHHHHHHHH####....
 [224]HHHHHHHHHHHHHHHHHHH####....[223]HHHHHHHHHHHHHHHHHHH####....

The page header (P) and line pointers (N) appear at the start, free space in the middle, and tuples grow from the end of the page backward. The page is full when no more space remains between line pointers and tuples.

Requires superuser access (uses pageinspect’s get_raw_page).

Last updated on