Fix gin_desc routine to match the WAL format.

In the GIN incomplete-splits patch, I used BlockIdDatas to store the block
number of left and right children, when inserting a downlink after a split
to an internal page posting list page. But gin_desc thought they were stored
as BlockNumbers.
pull/6/head
Heikki Linnakangas 12 years ago
parent da8a716089
commit 97c19e6c38
  1. 6
      src/backend/access/rmgrdesc/gindesc.c

@ -56,9 +56,9 @@ gin_desc(StringInfo buf, uint8 xl_info, char *rec)
BlockNumber leftChildBlkno;
BlockNumber rightChildBlkno;
memcpy(&leftChildBlkno, payload, sizeof(BlockNumber));
payload += sizeof(BlockNumber);
memcpy(&rightChildBlkno, payload, sizeof(BlockNumber));
leftChildBlkno = BlockIdGetBlockNumber((BlockId) payload);
payload += sizeof(BlockIdData);
rightChildBlkno = BlockIdGetBlockNumber((BlockId) payload);
payload += sizeof(BlockNumber);
appendStringInfo(buf, " children: %u/%u",
leftChildBlkno, rightChildBlkno);

Loading…
Cancel
Save