In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Struct HeapTupleHeaderData {union {HeapTupleFields tweeted heap; DatumTupleFields tweeted data;} tweeted choice; ItemPointerData tweectidbot / uint16 tweak infomask2; / * number of attributes + various flags * / uint16 tasking infomask; / * various flag bits, see below * / uint8 tweehoff; / * sizeof header incl. Bitmap, padding * / bits8 t _ bits [flex _ ARRAY_MEMBER]; / * bitmap of NULLs * /}
T_choice is a federated type with two members:
T_heap: used to record transaction ID and command ID that perform insert / delete operations on tuples. This information is mainly used to check the visibility of tuples to transactions during concurrency control.
T_datum: when a new tuple is formed in memory, we don't care about its transaction visibility, so we only need to use the DatumTupleFields structure in t_choice to record information such as the length of the tuple. However, when inserting the tuple into the table file, the transaction and command ID inserted into the tuple need to be recorded in the tuple header information, so the memory occupied by t_choice will be converted into HeapTupleFields structure and the corresponding data will be filled before tuple insertion.
T_ctid is used to record the physical location of the current tuple or new tuple (block number and intra-block offset). If the tuple is updated (PostgreSQL updates the tuple by marking to delete the old version of the tuple and insert the new version of the tuple), the physical location of the new version of the tuple is recorded.
T_infomask2 uses its lower 11 bits to indicate the number of attributes in the current tuple, and other bits are used to include flag bits for HOT technology and tuple visibility.
T_infomask is used to identify the current state of a tuple, such as whether a tuple has an OID, whether an attribute is available, and so on. Each bit of t_infomask corresponds to a different state, with a total of 16 states.
T_hoff represents the size of the tuple header.
The _ bits [] array is used to identify which fields of the tuple are empty.
Multi-version technology is used to store tuples in PostgreSQL, and a new version is generated for each update operation of the tuple, and a version chain is formed between the versions (point the t_ctid field of the old version to the location of the next version).
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.