diff --git a/pg_filedump.c b/pg_filedump.c index 606a85b..650aa54 100644 --- a/pg_filedump.c +++ b/pg_filedump.c @@ -1621,7 +1621,7 @@ 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, @@ -1629,6 +1629,12 @@ FormatItem(char *buffer, unsigned int numBytes, unsigned int startIndex, 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>, " diff --git a/t/001_basic.pl b/t/001_basic.pl index 13369e9..4d8fa78 100644 --- a/t/001_basic.pl +++ b/t/001_basic.pl @@ -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;");