pagevis
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pagevis | 0.1 | STAT | MIT | SQL |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 6860 | pagevis | No | No | No | Yes | No | Yes | - |
| Related | pageinspect pg_visibility amcheck pg_surgery pgstattuple pg_dirtyread toastinfo pg_profile |
|---|
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.1 | 1817161514 | pagevis | - |
| RPM | PIGSTY | 0.1 | 1817161514 | pagevis_$v | - |
| DEB | PIGSTY | 0.1 | 1817161514 | postgresql-$v-pagevis | - |
Build
You can build the RPM / DEB packages for pagevis using pig build:
pig build pkg pagevis # build RPM / DEB packages
Install
You can install pagevis directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
pig repo add pgsql -u # Add repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install pagevis; # Install for current active PG version
pig ext install -y pagevis -v 18 # PG 18
pig ext install -y pagevis -v 17 # PG 17
pig ext install -y pagevis -v 16 # PG 16
pig ext install -y pagevis -v 15 # PG 15
pig ext install -y pagevis -v 14 # PG 14
dnf install -y pagevis_18 # PG 18
dnf install -y pagevis_17 # PG 17
dnf install -y pagevis_16 # PG 16
dnf install -y pagevis_15 # PG 15
dnf install -y pagevis_14 # PG 14
apt install -y postgresql-18-pagevis # PG 18
apt install -y postgresql-17-pagevis # PG 17
apt install -y postgresql-16-pagevis # PG 16
apt install -y postgresql-15-pagevis # PG 15
apt install -y postgresql-14-pagevis # PG 14
Create Extension:
CREATE EXTENSION pagevis;
Usage
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).
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.