BUG #13604: fsm NonLeafNodesPerPage Macro
От | jingwei_5107@qq.com |
---|---|
Тема | BUG #13604: fsm NonLeafNodesPerPage Macro |
Дата | |
Msg-id | 20150902034608.1378.91@wrigleys.postgresql.org обсуждение исходный текст |
Список | pgsql-bugs |
The following bug has been logged on the website: Bug reference: 13604 Logged by: will Email address: jingwei_5107@qq.com PostgreSQL version: 9.4.4 Operating system: windows Description: In fsm_internals.h, it defines: /* * Number of non-leaf and leaf nodes, and nodes in total, on an FSM page. * These definitions are internal to fsmpage.c. */ #define NodesPerPage (BLCKSZ - MAXALIGN(SizeOfPageHeaderData) - \ offsetof(FSMPageData, fp_nodes)) #define NonLeafNodesPerPage (BLCKSZ / 2 - 1) #define LeafNodesPerPage (NodesPerPage - NonLeafNodesPerPage) I can understand the NodesPerPage & LeafNodesPerPage, but do not undertand the second NonLeafNodesPerPage Macro. Should it be like: #define NonLeafNodesPerPage (NodesPerPage / 2 - 1) ? Since BLCKSZ contains extra Page hdr&FSMPage hdr, NonLeafNodesPerPage will be larger than its true value. I have not much document at hand, more possibility is my misunderstanding of the code. If so, pls let me know. Thanks!
В списке pgsql-bugs по дате отправления: