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
Prev Previous commit
Next Next commit
[PGPRO-12159] Added three missing pageinspect functions for rum.
1) rum_internal_data_page_items() - it is intended for viewing information
   that is located on the internal pages of the posting tree (flags {data}).
2) rum_leaf_entry_page_items() - it is intended for viewing information
   that is located on the leaf pages of the entry tree (flags {leaf}).
3) rum_internal_entry_page_items() - it is intended for viewing information
   that is located on the internal pages of the entry tree (flags {}).

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 d3121f311e7ee27e4ed353c73e2bcb2c393e1750
44 changes: 41 additions & 3 deletions 44 rum_init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ LANGUAGE C;
/*
* RUM access method
*/

CREATE ACCESS METHOD rum TYPE INDEX HANDLER rumhandler;

/*
Expand Down Expand Up @@ -1738,7 +1737,7 @@ CREATE FUNCTION rum_metapage_info(
OUT n_entry_pages bigint,
OUT n_data_pages bigint,
OUT n_entries bigint,
OUT version bigint)
OUT version varchar)
AS 'MODULE_PATHNAME', 'rum_metapage_info'
LANGUAGE C STRICT PARALLEL SAFE;

Expand All @@ -1756,9 +1755,48 @@ LANGUAGE C STRICT PARALLEL SAFE;
CREATE FUNCTION rum_leaf_data_page_items(
IN rel_name text,
IN blk_num int8,
OUT is_high_key bool,
OUT tuple_id tid,
OUT add_info_is_null bool,
OUT addInfo varchar)
OUT add_info varchar)
RETURNS SETOF record
AS 'MODULE_PATHNAME', 'rum_leaf_data_page_items'
LANGUAGE C STRICT PARALLEL SAFE;

CREATE FUNCTION rum_internal_data_page_items(
IN rel_name text,
IN blk_num int8,
OUT is_high_key bool,
OUT block_number int8,
OUT tuple_id tid,
OUT add_info_is_null bool,
OUT add_info varchar)
RETURNS SETOF record
AS 'MODULE_PATHNAME', 'rum_internal_data_page_items'
LANGUAGE C STRICT PARALLEL SAFE;

CREATE FUNCTION rum_leaf_entry_page_items(
IN rel_name text,
IN blk_num int8,
OUT key varchar,
OUT attrnum int8,
OUT category varchar,
OUT tuple_id tid,
OUT add_info_is_null bool,
OUT add_info varchar,
OUT is_postring_tree bool,
OUT postring_tree_root int8)
RETURNS SETOF record
AS 'MODULE_PATHNAME', 'rum_leaf_entry_page_items'
LANGUAGE C STRICT PARALLEL SAFE;

CREATE FUNCTION rum_internal_entry_page_items(
IN rel_name text,
IN blk_num int8,
OUT key varchar,
OUT attrnum int8,
OUT category varchar,
OUT down_link int8)
RETURNS SETOF record
AS 'MODULE_PATHNAME', 'rum_internal_entry_page_items'
LANGUAGE C STRICT PARALLEL SAFE;
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.