Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 7 additions & 1 deletion pg_filedump.c
Original file line number Diff line number Diff line change
Expand Up @@ -1621,14 +1621,20 @@ FormatItem(char *buffer, unsigned int numBytes, unsigned int startIndex,
IndexTuple itup = (IndexTuple) (&(buffer[startIndex]));

printf(" Block Id: %u linp Index: %u Size: %d\n"
" Has Nulls: %u Has Varwidths: %u\n\n",
" Has Nulls: %u Has Varwidths: %u",
((uint32) ((itup->t_tid.ip_blkid.bi_hi << 16) |
(uint16) itup->t_tid.ip_blkid.bi_lo)),
itup->t_tid.ip_posid,
(int) IndexTupleSize(itup),
IndexTupleHasNulls(itup) ? 1 : 0,
IndexTupleHasVarwidths(itup) ? 1 : 0);

#if PG_VERSION_NUM >= 130000
if (BTreeTupleIsPosting(itup))
printf(" Posting Length: %u", BTreeTupleGetNPosting(itup));
#endif
printf("\n\n");

if (numBytes != IndexTupleSize(itup))
{
printf(" Error: Index item size difference. Given <%u>, "
Expand Down
6 changes: 6 additions & 0 deletions t/001_basic.pl
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ sub test_btree_output
ok($out_ =~ qr/Level/, "Level found");
ok($out_ !~ qr/Next XID/, "Next XID not found");

my $version = $node->safe_psql('postgres', 'show server_version_num');
if ($version >= 130000)
{
like($out_, qr/Posting Length: \d+/, "Posting Length found");
}

# make leaf with BTP_DELETED flag
$node->safe_psql('postgres', "delete from t1 where a >= 2000 and a < 4000;");
$node->safe_psql('postgres', "vacuum t1; checkpoint;");
Expand Down