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
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] Fixed test crashes on version 15 of PostgreSQL.
The crashes were due to the fact that the construct_array_builtin()
function is not defined on versions below 16.

Tags: rum
  • Loading branch information
Arseny Kositsyn committed May 15, 2025
commit 05b292a7c54622b3404d169c2a59933982d44635
37 changes: 36 additions & 1 deletion 37 src/rum_debug_funcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,13 @@ rum_page_opaque_info(PG_FUNCTION_ARGS)
values[1] = Int64GetDatum(opaq->rightlink);
values[2] = Int32GetDatum(opaq->maxoff);
values[3] = Int32GetDatum(opaq->freespace);
values[4] = PointerGetDatum(construct_array_builtin(flags, nflags, TEXTOID));

#if PG_VERSION_NUM >= 160000
values[4] = ItemPointerGetDatum(construct_array_builtin(flags, nflags, TEXTOID));
#else
values[4] = PointerGetDatum(construct_array(flags, nflags,
TEXTOID, -1, false, TYPALIGN_INT));
#endif

/* Build and return the result tuple. */
resultTuple = heap_form_tuple(tupdesc, values, nulls);
Expand Down Expand Up @@ -495,7 +501,13 @@ rum_leaf_data_page_items(PG_FUNCTION_ARGS)
{
high_key_ptr = RumDataPageGetRightBound(inter_call_data->page);
values[0] = BoolGetDatum(true);

#if PG_VERSION_NUM >= 160000
values[1] = ItemPointerGetDatum(&(high_key_ptr->iptr));
#else
values[1] = PointerGetDatum(&(high_key_ptr->iptr));
#endif

values[2] = BoolGetDatum(high_key_ptr->addInfoIsNull);

/* Returning add info */
Expand Down Expand Up @@ -533,7 +545,13 @@ rum_leaf_data_page_items(PG_FUNCTION_ARGS)

/* Writing data from rum_item to values */
values[0] = false;

#if PG_VERSION_NUM >= 160000
values[1] = ItemPointerGetDatum(&(rum_item_ptr->iptr));
#else
values[1] = PointerGetDatum(&(rum_item_ptr->iptr));
#endif

values[2] = BoolGetDatum(rum_item_ptr->addInfoIsNull);

/* Returning add info */
Expand Down Expand Up @@ -733,7 +751,13 @@ rum_internal_data_page_items(PG_FUNCTION_ARGS)
high_key_ptr = RumDataPageGetRightBound(inter_call_data->page);
values[0] = BoolGetDatum(true);
nulls[1] = true;

#if PG_VERSION_NUM >= 160000
values[2] = ItemPointerGetDatum(&(high_key_ptr->iptr));
#else
values[2] = PointerGetDatum(&(high_key_ptr->iptr));
#endif

values[3] = BoolGetDatum(high_key_ptr->addInfoIsNull);

/* Returning add info */
Expand Down Expand Up @@ -771,7 +795,13 @@ rum_internal_data_page_items(PG_FUNCTION_ARGS)
/* Writing data from posting_item_ptr to values */
values[0] = BoolGetDatum(false);
values[1] = UInt32GetDatum(PostingItemGetBlockNumber(posting_item_ptr));

#if PG_VERSION_NUM >= 160000
values[2] = ItemPointerGetDatum(&(posting_item_ptr->item.iptr));
#else
values[2] = PointerGetDatum(&(posting_item_ptr->item.iptr));
#endif

values[3] = BoolGetDatum(posting_item_ptr->item.addInfoIsNull);

/* Returning add info */
Expand Down Expand Up @@ -1049,7 +1079,12 @@ rum_leaf_entry_page_items(PG_FUNCTION_ARGS)
values[2] = category_get_datum_text(inter_call_data->cur_tuple_key_category);

/* Writing data from rum_item to values */
#if PG_VERSION_NUM >= 160000
values[3] = ItemPointerGetDatum(&(rum_item_ptr->iptr));
#else
values[3] = PointerGetDatum(&(rum_item_ptr->iptr));
#endif

values[4] = BoolGetDatum(rum_item_ptr->addInfoIsNull);

/* Returning add info */
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.