Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[PGPRO-12159] Added functions for exploring the pages of the rum index. #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
Loading
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[PGPRO-12159] Added pageinspect functions for rum.
This commit adds three functions for low-level exploration
of the index's rum pages:

1) rum_metapage_info() -- is used to examine the information
posted on the meta page (flags: {meta}).
2) rum_page_opaque_info() -- is used to examine information
that is placed in the opaque area of the index page (any
index page).
3) rum_leaf_data_page_items() -- is used to examine the
information that is placed on the leaf pages of the
posting tree (flags: {leaf, data}).

To extract information, all these functions need to pass
the index name and the page number.

Tags: rum
  • Loading branch information
arseny114 authored and Arseny Kositsyn committed May 15, 2025
commit 169cf5a38e42fce00a238367e5579d791f2fc4ff
2 changes: 1 addition & 1 deletion 2 Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ OBJS = src/rumsort.o src/rum_ts_utils.o src/rumtsquery.o \
src/rumbtree.o src/rumbulk.o src/rumdatapage.o \
src/rumentrypage.o src/rumget.o src/ruminsert.o \
src/rumscan.o src/rumutil.o src/rumvacuum.o src/rumvalidate.o \
src/btree_rum.o src/rum_arr_utils.o $(WIN32RES)
src/btree_rum.o src/rum_arr_utils.o src/rum_debug_funcs.o $(WIN32RES)

DATA_updates = rum--1.0--1.1.sql rum--1.1--1.2.sql \
rum--1.2--1.3.sql
Expand Down
38 changes: 38 additions & 0 deletions 38 rum_init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1724,3 +1724,41 @@ RETURNS float4
AS 'MODULE_PATHNAME', 'rum_ts_score_td'
LANGUAGE C IMMUTABLE STRICT;

/*--------------------RUM debug functions-----------------------*/

CREATE FUNCTION rum_metapage_info(
IN rel_name text,
IN blk_num int8,
OUT pending_head bigint,
OUT pending_tail bigint,
OUT tail_free_size int4,
OUT n_pending_pages bigint,
OUT n_pending_tuples bigint,
OUT n_total_pages bigint,
OUT n_entry_pages bigint,
OUT n_data_pages bigint,
OUT n_entries bigint,
OUT version bigint)
AS 'MODULE_PATHNAME', 'rum_metapage_info'
LANGUAGE C STRICT PARALLEL SAFE;

CREATE FUNCTION rum_page_opaque_info(
IN rel_name text,
IN blk_num int8,
OUT leftlink bigint,
OUT rightlink bigint,
OUT maxoff int4,
OUT freespace int4,
OUT flags text[])
AS 'MODULE_PATHNAME', 'rum_page_opaque_info'
LANGUAGE C STRICT PARALLEL SAFE;

CREATE FUNCTION rum_leaf_data_page_items(
IN rel_name text,
IN blk_num int8,
OUT tuple_id tid,
OUT add_info_is_null bool,
OUT addInfo varchar)
RETURNS SETOF record
AS 'MODULE_PATHNAME', 'rum_leaf_data_page_items'
LANGUAGE C STRICT PARALLEL SAFE;
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.