Skip to content
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

i change the pg code, can you give me some advice how to adjust the rum code? #83

Open
miaojianxin opened this issue Apr 3, 2020 · 1 comment

Comments

@miaojianxin
Copy link

for some application, our pg code changed like this:
the structuer ItemIdData changed,
like this,

the lp_off,lp_len changed from 16 to 31.
in one page, the item number of tuples and the length of the tuple changed.

typedef struct ItemIdData
{
uint64 lp_off:31, /* offset to tuple (from start of page) /
lp_flags:2, /
state of item pointer, see below /
lp_len:31; /
byte length of tuple */
} ItemIdData;

the OffsetNumber changed from 16 to 32.
typedef uint32 OffsetNumber;

and we did some change for pg source in the other places , it has worked well.

when I use the rum code to pg, it core dump.
i did some change in rum code, may be the modify i did is imcomplete, the rum with pg still core。
can you give me some advice how to modify the rum code for my change in pg ?
thank you

@miaojianxin
Copy link
Author

I have done some modify for rum, but it is imcomplete。
I modified like this:
//mjx modify start
//16-->32bit
#define ItemPointerSetMax(p)
ItemPointerSet((p), InvalidBlockNumber, (OffsetNumber)0xfffffffe)

#define ItemPointerIsMax(p)
(RumItemPointerGetOffsetNumber(p) == (OffsetNumber)0xfffffffe &&
RumItemPointerGetBlockNumber(p) == InvalidBlockNumber)
#define ItemPointerSetLossyPage(p, b)
ItemPointerSet((p), (b), (OffsetNumber)0xffffffff)
#define ItemPointerIsLossyPage(p)
(RumItemPointerGetOffsetNumber(p) == (OffsetNumber)0xffffffff &&
RumItemPointerGetBlockNumber(p) != InvalidBlockNumber)
//mjx modify end

/mjx modify start
//16-->32bit
#define RUM_TREE_POSTING ((OffsetNumber)0xffffffff)
//mjx modify end
//mjx modify 16-->32
//#define ALT_ADD_INFO_NULL_FLAG (0x8000)
#define ALT_ADD_INFO_NULL_FLAG (0x80000000)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant