{"kind": "storage", "major": "18", "item": {"slug": "tuple-layout", "name": "Table row layout", "name_zh": "", "category": "\u7269\u7406\u7ed3\u6784", "summary": "\u7269\u7406\u884c\u9996\u90e8\u3001\u7a7a\u503c\u4f4d\u56fe\u3001\u5bf9\u9f50\u4e0e\u5217\u6570\u636e\u3002", "aliases": [], "content_hash": "88f17b7202aae1936cd9daf2acec59e035a72c47b3a7de4d5211d04bebf56f5f", "versions": {"11": {"facts": [], "tables": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u4e8b\u52a1\u7684 XID"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u5220\u9664\u4e8b\u52a1\u7684 XID"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 \u5b57\u8282", "c3": "\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 \u5b57\u8282", "c3": "\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf"}], "title": "HeapTupleHeaderData \u5e03\u5c40", "columns": [{"key": "c0", "label": "\u5b57\u6bb5"}, {"key": "c1", "label": "\u7c7b\u578b"}, {"key": "c2", "label": "\u957f\u5ea6"}, {"key": "c3", "label": "\u8bf4\u660e"}]}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v11.22/postgresql-11.22.tar.bz2", "label": "11.22", "major": "11", "channel": "stable", "revision": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0"}, "sources": [{"url": "https://pg.center/docs/11/storage-page-layout.html#STORAGE-TUPLE-LAYOUT", "path": "storage-page-layout.html", "label": "PostgreSQL 11 English manual", "sha256": "89ae53d52323261bb09214babd110c76bde78e92234cbea4a8e51c5548a1073b", "language": "en", "original_url": "/docs/11/storage-page-layout.html#STORAGE-TUPLE-LAYOUT"}], "sections": [], "signature": "", "description": ["\u7269\u7406\u884c\u9996\u90e8\u3001\u7a7a\u503c\u4f4d\u56fe\u3001\u5bf9\u9f50\u4e0e\u5217\u6570\u636e\u3002"], "manual_html": "<div class=\"sect2\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\">\n<dl class=\"toc\">\n<dt><span class=\"sect2\"><a href=\"/docs/11/storage-page-layout.html#STORAGE-TUPLE-LAYOUT\">69.6.1. \u8868\u884c\u5e03\u5c40</a></span></dt>\n</dl>\n</h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u6240\u6709\u8868\u884c\u7684\u7ed3\u6784\u90fd\u76f8\u540c\u3002\u5b83\u4eec\u90fd\u6709\u4e00\u4e2a\u56fa\u5b9a\u5927\u5c0f\u7684\u5934\u90e8\uff08\u5728\u5927\u591a\u6570\u673a\u5668\u4e0a\u5360 23 \u5b57\u8282\uff09\uff0c\u540e\u9762\u8ddf\u7740\u53ef\u9009\u7684\u7a7a\u503c\u4f4d\u56fe\u3001\u53ef\u9009\u7684\u5bf9\u8c61 ID \u5b57\u6bb5\u4ee5\u53ca\u7528\u6237\u6570\u636e\u3002\u5934\u90e8\u7684\u8be6\u7ec6\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/11/storage-page-layout.html#HEAPTUPLEHEADERDATA-TABLE\" title=\"\u8868\u00a069.4.\u00a0HeapTupleHeaderData \u5e03\u5c40\">\u8868\u00a069.4</a>\u3002\u5b9e\u9645\u7528\u6237\u6570\u636e\uff08\u884c\u7684\u5404\u5217\uff09\u4ece <code class=\"structfield\">t_hoff</code> \u6307\u793a\u7684\u504f\u79fb\u4f4d\u7f6e\u5f00\u59cb\uff0c\u5b83\u5fc5\u987b\u59cb\u7ec8\u662f\u8be5\u5e73\u53f0 MAXALIGN \u5bf9\u9f50\u5355\u4f4d\u7684\u6574\u6570\u500d\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASNULL</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u7a7a\u503c\u4f4d\u56fe\u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u7d27\u968f\u56fa\u5b9a\u5934\u90e8\u4e4b\u540e\uff0c\u5e76\u5360\u7528\u8db3\u591f\u591a\u7684\u5b57\u8282\uff0c\u4ee5\u4fbf\u4e3a\u6bcf\u4e2a\u6570\u636e\u5217\u63d0\u4f9b\u4e00\u4f4d\uff08\u4e5f\u5c31\u662f\u8bf4\uff0c\u603b\u5171\u4e3a <code class=\"structfield\">t_natts</code> \u4f4d\uff09\u3002\u5728\u8fd9\u4e2a\u4f4d\u56fe\u4e2d\uff0c1 \u8868\u793a\u975e\u7a7a\uff0c0 \u8868\u793a\u7a7a\u503c\u3002\u5f53\u4f4d\u56fe\u4e0d\u5b58\u5728\u65f6\uff0c\u5047\u5b9a\u6240\u6709\u5217\u90fd\u975e\u7a7a\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASOID</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u5bf9\u8c61 ID \u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u4f4d\u4e8e <code class=\"structfield\">t_hoff</code> \u8fb9\u754c\u4e4b\u524d\u3002\u4e3a\u4e86\u8ba9 <code class=\"structfield\">t_hoff</code> \u6210\u4e3a MAXALIGN \u7684\u6574\u6570\u500d\u6240\u9700\u7684\u4efb\u4f55\u586b\u5145\uff0c\u90fd\u4f1a\u51fa\u73b0\u5728\u7a7a\u503c\u4f4d\u56fe\u4e0e\u5bf9\u8c61 ID \u4e4b\u95f4\u3002\uff08\u8fd9\u53c8\u53cd\u8fc7\u6765\u4fdd\u8bc1\u4e86\u5bf9\u8c61 ID \u7684\u5bf9\u9f50\u662f\u5408\u9002\u7684\u3002\uff09</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a069.4.\u00a0HeapTupleHeaderData \u5e03\u5c40</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u5b57\u6bb5</th>\n<th lang=\"zh\">\u7c7b\u578b</th>\n<th lang=\"zh\">\u957f\u5ea6</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>t_xmin</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_xmax</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u5220\u9664\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_cid</td>\n<td>CommandId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e</td>\n</tr>\n<tr>\n<td>t_xvac</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID</td>\n</tr>\n<tr>\n<td>t_ctid</td>\n<td>ItemPointerData</td>\n<td lang=\"zh\">6 \u5b57\u8282</td>\n<td lang=\"zh\">\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID</td>\n</tr>\n<tr>\n<td>t_infomask2</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_infomask</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_hoff</td>\n<td>uint8</td>\n<td lang=\"zh\">1 \u5b57\u8282</td>\n<td lang=\"zh\">\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u6240\u6709\u7ec6\u8282\u90fd\u53ef\u4ee5\u5728 <code class=\"filename\">src/include/access/htup_details.h</code> \u4e2d\u627e\u5230\u3002</p>\n<p lang=\"zh\">\u8981\u89e3\u91ca\u5b9e\u9645\u6570\u636e\uff0c\u5fc5\u987b\u501f\u52a9\u4ece\u5176\u4ed6\u8868\u4e2d\u83b7\u5f97\u7684\u4fe1\u606f\uff0c\u5176\u4e2d\u5927\u90e8\u5206\u6765\u81ea <code class=\"structname\">pg_attribute</code>\u3002\u8bc6\u522b\u5b57\u6bb5\u4f4d\u7f6e\u6240\u9700\u7684\u5173\u952e\u503c\u662f <code class=\"structfield\">attlen</code> \u548c <code class=\"structfield\">attalign</code>\u3002\u9664\u975e\u6240\u6709\u5b57\u6bb5\u90fd\u662f\u5b9a\u5bbd\u4e14\u6ca1\u6709\u7a7a\u503c\uff0c\u5426\u5219\u6ca1\u6709\u529e\u6cd5\u76f4\u63a5\u53d6\u5f97\u67d0\u4e2a\u7279\u5b9a\u5c5e\u6027\u3002\u6240\u6709\u8fd9\u4e9b\u6280\u5de7\u90fd\u5c01\u88c5\u5728 <em class=\"firstterm\">heap_getattr</em>\u3001<em class=\"firstterm\">fastgetattr</em> \u548c <em class=\"firstterm\">heap_getsysattr</em> \u8fd9\u4e9b\u51fd\u6570\u4e2d\u3002</p>\n<p lang=\"zh\">\u8bfb\u53d6\u6570\u636e\u65f6\uff0c\u9700\u8981\u4f9d\u6b21\u68c0\u67e5\u6bcf\u4e2a\u5c5e\u6027\u3002\u9996\u5148\u6839\u636e\u7a7a\u503c\u4f4d\u56fe\u5224\u65ad\u8be5\u5b57\u6bb5\u662f\u5426\u4e3a NULL\u3002\u5982\u679c\u662f\uff0c\u5c31\u7ee7\u7eed\u4e0b\u4e00\u4e2a\u3002\u7136\u540e\u786e\u8ba4\u5bf9\u9f50\u662f\u5426\u6b63\u786e\u3002\u5982\u679c\u5b57\u6bb5\u662f\u5b9a\u5bbd\u5b57\u6bb5\uff0c\u90a3\u4e48\u5b83\u7684\u6240\u6709\u5b57\u8282\u90fd\u662f\u76f4\u63a5\u6446\u653e\u7684\uff1b\u5982\u679c\u5b83\u662f\u53d8\u957f\u5b57\u6bb5\uff08attlen = -1\uff09\uff0c\u60c5\u51b5\u5c31\u4f1a\u7a0d\u590d\u6742\u4e00\u4e9b\u3002\u6240\u6709\u53d8\u957f\u6570\u636e\u7c7b\u578b\u90fd\u5171\u4eab\u4e00\u4e2a\u901a\u7528\u5934\u90e8\u7ed3\u6784\u4f53 <code class=\"type\">struct varlena</code>\uff0c\u5176\u4e2d\u5305\u542b\u5df2\u5b58\u50a8\u503c\u7684\u603b\u957f\u5ea6\u4ee5\u53ca\u4e00\u4e9b\u6807\u5fd7\u4f4d\u3002\u6839\u636e\u8fd9\u4e9b\u6807\u5fd7\uff0c\u6570\u636e\u53ef\u80fd\u662f\u884c\u5185\u5b58\u50a8\u7684\uff0c\u4e5f\u53ef\u80fd\u4f4d\u4e8e <acronym class=\"acronym\">TOAST</acronym> \u8868\u4e2d\uff1b\u5b83\u4e5f\u53ef\u80fd\u662f\u7ecf\u8fc7\u538b\u7f29\u7684\uff08\u89c1<a class=\"xref\" href=\"/docs/11/storage-toast.html\" title=\"69.2.\u00a0TOAST\">\u7b2c\u00a069.2\u00a0\u8282</a>\uff09\u3002</p>\n</div>", "manual_path": "/docs/11/storage-page-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/11/storage-page-layout.html", "method": "same-major semantic node", "sha256": "2e786c1b60ec8abf4a16033196a1e0170710e61ad0177788b174748ccda0ac62", "language": "zh", "matched_nodes": ["#STORAGE-PAGE-LAYOUT/div[15]/div[2]/p[0]", "#STORAGE-PAGE-LAYOUT/div[15]/p[1]", "#STORAGE-PAGE-LAYOUT/div[15]/p[4]", "#STORAGE-PAGE-LAYOUT/div[15]/p[5]", "#STORAGE-PAGE-LAYOUT/div[15]/p[6]", "#STORAGE-PAGE-LAYOUT/div[1]"]}], "language": "zh", "original_text": {"/versions/11/description/0": "Physical row headers, null bitmap, alignment and column data.", "/versions/11/tables/0/title": "HeapTupleHeaderData Layout", "/versions/11/tables/0/rows/0/c2": "4 bytes", "/versions/11/tables/0/rows/0/c3": "insert XID stamp", "/versions/11/tables/0/rows/1/c2": "4 bytes", "/versions/11/tables/0/rows/1/c3": "delete XID stamp", "/versions/11/tables/0/rows/2/c2": "4 bytes", "/versions/11/tables/0/rows/2/c3": "insert and/or delete CID stamp (overlays with t_xvac)", "/versions/11/tables/0/rows/3/c2": "4 bytes", "/versions/11/tables/0/rows/3/c3": "XID for VACUUM operation moving a row version", "/versions/11/tables/0/rows/4/c2": "6 bytes", "/versions/11/tables/0/rows/4/c3": "current TID of this or newer row version", "/versions/11/tables/0/rows/5/c2": "2 bytes", "/versions/11/tables/0/rows/5/c3": "number of attributes, plus various flag bits", "/versions/11/tables/0/rows/6/c2": "2 bytes", "/versions/11/tables/0/rows/6/c3": "various flag bits", "/versions/11/tables/0/rows/7/c2": "1 byte", "/versions/11/tables/0/rows/7/c3": "offset to user data", "/versions/11/tables/0/columns/0/label": "Field", "/versions/11/tables/0/columns/1/label": "Type", "/versions/11/tables/0/columns/2/label": "Length", "/versions/11/tables/0/columns/3/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "d562e8dfe3b04c94ffb663deceba6acde64cb2369268b1869886b570fefe4c8b"}, "comparison_data": {"layouts": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 bytes", "c3": "insert XID stamp"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 bytes", "c3": "delete XID stamp"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 bytes", "c3": "insert and/or delete CID stamp (overlays with t_xvac)"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 bytes", "c3": "XID for VACUUM operation moving a row version"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 bytes", "c3": "current TID of this or newer row version"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 bytes", "c3": "number of attributes, plus various flag bits"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 bytes", "c3": "various flag bits"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 byte", "c3": "offset to user data"}], "title": "HeapTupleHeaderData Layout", "columns": [{"key": "c0", "label": "Field"}, {"key": "c1", "label": "Type"}, {"key": "c2", "label": "Length"}, {"key": "c3", "label": "Description"}]}]}, "comparison_hash": "7f6e968716966dae8869d6c14f0a6aa229d745d4d4bde899b61eeec58c8d7ea0", "manual_language": "zh"}, "12": {"facts": [], "tables": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u4e8b\u52a1\u7684 XID"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u5220\u9664\u4e8b\u52a1\u7684 XID"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 \u5b57\u8282", "c3": "\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 \u5b57\u8282", "c3": "\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf"}], "title": "HeapTupleHeaderData \u5e03\u5c40", "columns": [{"key": "c0", "label": "\u5b57\u6bb5"}, {"key": "c1", "label": "\u7c7b\u578b"}, {"key": "c2", "label": "\u957f\u5ea6"}, {"key": "c3", "label": "\u8bf4\u660e"}]}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2", "label": "12.22", "major": "12", "channel": "stable", "revision": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}, "sources": [{"url": "https://pg.center/docs/12/storage-page-layout.html#STORAGE-TUPLE-LAYOUT", "path": "storage-page-layout.html", "label": "PostgreSQL 12 English manual", "sha256": "f485389ef7d0b5fd0a2ba4d0199308aac99fa413f8bdca01c3dab726841ee224", "language": "en", "original_url": "/docs/12/storage-page-layout.html#STORAGE-TUPLE-LAYOUT"}], "sections": [], "signature": "", "description": ["\u7269\u7406\u884c\u9996\u90e8\u3001\u7a7a\u503c\u4f4d\u56fe\u3001\u5bf9\u9f50\u4e0e\u5217\u6570\u636e\u3002"], "manual_html": "<div class=\"sect2\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\">\n<dl class=\"toc\">\n<dt><span class=\"sect2\"><a href=\"/docs/12/storage-page-layout.html#STORAGE-TUPLE-LAYOUT\">69.6.1. \u8868\u884c\u5e03\u5c40</a></span></dt>\n</dl>\n</h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u6240\u6709\u8868\u884c\u7684\u7ed3\u6784\u90fd\u76f8\u540c\u3002\u5b83\u4eec\u90fd\u6709\u4e00\u4e2a\u56fa\u5b9a\u5927\u5c0f\u7684\u5934\u90e8\uff08\u5728\u5927\u591a\u6570\u673a\u5668\u4e0a\u5360 23 \u5b57\u8282\uff09\uff0c\u540e\u9762\u8ddf\u7740\u53ef\u9009\u7684\u7a7a\u503c\u4f4d\u56fe\u3001\u53ef\u9009\u7684\u5bf9\u8c61 ID \u5b57\u6bb5\u4ee5\u53ca\u7528\u6237\u6570\u636e\u3002\u5934\u90e8\u7684\u8be6\u7ec6\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/12/storage-page-layout.html#HEAPTUPLEHEADERDATA-TABLE\" title=\"\u8868\u00a069.4.\u00a0HeapTupleHeaderData \u5e03\u5c40\">\u8868\u00a069.4</a>\u3002\u5b9e\u9645\u7528\u6237\u6570\u636e\uff08\u884c\u7684\u5404\u5217\uff09\u4ece <code class=\"structfield\">t_hoff</code> \u6307\u793a\u7684\u504f\u79fb\u4f4d\u7f6e\u5f00\u59cb\uff0c\u5b83\u5fc5\u987b\u59cb\u7ec8\u662f\u8be5\u5e73\u53f0 MAXALIGN \u5bf9\u9f50\u5355\u4f4d\u7684\u6574\u6570\u500d\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASNULL</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u7a7a\u503c\u4f4d\u56fe\u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u7d27\u968f\u56fa\u5b9a\u5934\u90e8\u4e4b\u540e\uff0c\u5e76\u5360\u7528\u8db3\u591f\u591a\u7684\u5b57\u8282\uff0c\u4ee5\u4fbf\u4e3a\u6bcf\u4e2a\u6570\u636e\u5217\u63d0\u4f9b\u4e00\u4f4d\uff08\u4e5f\u5c31\u662f\u8bf4\uff0c\u5176\u4f4d\u6570\u7b49\u4e8e <code class=\"structfield\">t_infomask2</code> \u4e2d\u7684\u5c5e\u6027\u4e2a\u6570\uff09\u3002\u5728\u8fd9\u4e2a\u4f4d\u56fe\u4e2d\uff0c1 \u8868\u793a\u975e\u7a7a\uff0c0 \u8868\u793a\u7a7a\u503c\u3002\u5f53\u4f4d\u56fe\u4e0d\u5b58\u5728\u65f6\uff0c\u5047\u5b9a\u6240\u6709\u5217\u90fd\u975e\u7a7a\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASOID_OLD</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u5bf9\u8c61 ID \u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u4f4d\u4e8e <code class=\"structfield\">t_hoff</code> \u8fb9\u754c\u4e4b\u524d\u3002\u4e3a\u4e86\u8ba9 <code class=\"structfield\">t_hoff</code> \u6210\u4e3a MAXALIGN \u7684\u6574\u6570\u500d\u6240\u9700\u7684\u4efb\u4f55\u586b\u5145\uff0c\u90fd\u4f1a\u51fa\u73b0\u5728\u7a7a\u503c\u4f4d\u56fe\u4e0e\u5bf9\u8c61 ID \u4e4b\u95f4\u3002\uff08\u8fd9\u53c8\u53cd\u8fc7\u6765\u4fdd\u8bc1\u4e86\u5bf9\u8c61 ID \u7684\u5bf9\u9f50\u662f\u5408\u9002\u7684\u3002\uff09</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a069.4.\u00a0HeapTupleHeaderData \u5e03\u5c40</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u5b57\u6bb5</th>\n<th lang=\"zh\">\u7c7b\u578b</th>\n<th lang=\"zh\">\u957f\u5ea6</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>t_xmin</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_xmax</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u5220\u9664\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_cid</td>\n<td>CommandId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e</td>\n</tr>\n<tr>\n<td>t_xvac</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID</td>\n</tr>\n<tr>\n<td>t_ctid</td>\n<td>ItemPointerData</td>\n<td lang=\"zh\">6 \u5b57\u8282</td>\n<td lang=\"zh\">\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID</td>\n</tr>\n<tr>\n<td>t_infomask2</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_infomask</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_hoff</td>\n<td>uint8</td>\n<td lang=\"zh\">1 \u5b57\u8282</td>\n<td lang=\"zh\">\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u6240\u6709\u7ec6\u8282\u90fd\u53ef\u4ee5\u5728 <code class=\"filename\">src/include/access/htup_details.h</code> \u4e2d\u627e\u5230\u3002</p>\n<p lang=\"zh\">\u8981\u89e3\u91ca\u5b9e\u9645\u6570\u636e\uff0c\u5fc5\u987b\u501f\u52a9\u4ece\u5176\u4ed6\u8868\u4e2d\u83b7\u5f97\u7684\u4fe1\u606f\uff0c\u5176\u4e2d\u5927\u90e8\u5206\u6765\u81ea <code class=\"structname\">pg_attribute</code>\u3002\u8bc6\u522b\u5b57\u6bb5\u4f4d\u7f6e\u6240\u9700\u7684\u5173\u952e\u503c\u662f <code class=\"structfield\">attlen</code> \u548c <code class=\"structfield\">attalign</code>\u3002\u9664\u975e\u6240\u6709\u5b57\u6bb5\u90fd\u662f\u5b9a\u5bbd\u4e14\u6ca1\u6709\u7a7a\u503c\uff0c\u5426\u5219\u6ca1\u6709\u529e\u6cd5\u76f4\u63a5\u53d6\u5f97\u67d0\u4e2a\u7279\u5b9a\u5c5e\u6027\u3002\u6240\u6709\u8fd9\u4e9b\u6280\u5de7\u90fd\u5c01\u88c5\u5728 <em class=\"firstterm\">heap_getattr</em>\u3001<em class=\"firstterm\">fastgetattr</em> \u548c <em class=\"firstterm\">heap_getsysattr</em> \u8fd9\u4e9b\u51fd\u6570\u4e2d\u3002</p>\n<p lang=\"zh\">\u8bfb\u53d6\u6570\u636e\u65f6\uff0c\u9700\u8981\u4f9d\u6b21\u68c0\u67e5\u6bcf\u4e2a\u5c5e\u6027\u3002\u9996\u5148\u6839\u636e\u7a7a\u503c\u4f4d\u56fe\u5224\u65ad\u8be5\u5b57\u6bb5\u662f\u5426\u4e3a NULL\u3002\u5982\u679c\u662f\uff0c\u5c31\u7ee7\u7eed\u4e0b\u4e00\u4e2a\u3002\u7136\u540e\u786e\u8ba4\u5bf9\u9f50\u662f\u5426\u6b63\u786e\u3002\u5982\u679c\u5b57\u6bb5\u662f\u5b9a\u5bbd\u5b57\u6bb5\uff0c\u90a3\u4e48\u5b83\u7684\u6240\u6709\u5b57\u8282\u90fd\u662f\u76f4\u63a5\u6446\u653e\u7684\uff1b\u5982\u679c\u5b83\u662f\u53d8\u957f\u5b57\u6bb5\uff08attlen = -1\uff09\uff0c\u60c5\u51b5\u5c31\u4f1a\u7a0d\u590d\u6742\u4e00\u4e9b\u3002\u6240\u6709\u53d8\u957f\u6570\u636e\u7c7b\u578b\u90fd\u5171\u4eab\u4e00\u4e2a\u901a\u7528\u5934\u90e8\u7ed3\u6784\u4f53 <code class=\"type\">struct varlena</code>\uff0c\u5176\u4e2d\u5305\u542b\u5df2\u5b58\u50a8\u503c\u7684\u603b\u957f\u5ea6\u4ee5\u53ca\u4e00\u4e9b\u6807\u5fd7\u4f4d\u3002\u6839\u636e\u8fd9\u4e9b\u6807\u5fd7\uff0c\u6570\u636e\u53ef\u80fd\u662f\u884c\u5185\u5b58\u50a8\u7684\uff0c\u4e5f\u53ef\u80fd\u4f4d\u4e8e <acronym class=\"acronym\">TOAST</acronym> \u8868\u4e2d\uff1b\u5b83\u4e5f\u53ef\u80fd\u662f\u7ecf\u8fc7\u538b\u7f29\u7684\uff08\u89c1<a class=\"xref\" href=\"/docs/12/storage-toast.html\" title=\"69.2.\u00a0TOAST\">\u7b2c\u00a069.2\u00a0\u8282</a>\uff09\u3002</p>\n</div>", "manual_path": "/docs/12/storage-page-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/12/storage-page-layout.html", "method": "same-major semantic node", "sha256": "f61914805748cb00cfee1c774b88cde0c23c3383ac638b65752b83955e547bb3", "language": "zh", "matched_nodes": ["#STORAGE-PAGE-LAYOUT/div[18]/div[2]/p[0]", "#STORAGE-PAGE-LAYOUT/div[18]/p[1]", "#STORAGE-PAGE-LAYOUT/div[18]/p[4]", "#STORAGE-PAGE-LAYOUT/div[18]/p[5]", "#STORAGE-PAGE-LAYOUT/div[18]/p[6]", "#STORAGE-PAGE-LAYOUT/div[1]"]}], "language": "zh", "original_text": {"/versions/12/description/0": "Physical row headers, null bitmap, alignment and column data.", "/versions/12/tables/0/title": "HeapTupleHeaderData Layout", "/versions/12/tables/0/rows/0/c2": "4 bytes", "/versions/12/tables/0/rows/0/c3": "insert XID stamp", "/versions/12/tables/0/rows/1/c2": "4 bytes", "/versions/12/tables/0/rows/1/c3": "delete XID stamp", "/versions/12/tables/0/rows/2/c2": "4 bytes", "/versions/12/tables/0/rows/2/c3": "insert and/or delete CID stamp (overlays with t_xvac)", "/versions/12/tables/0/rows/3/c2": "4 bytes", "/versions/12/tables/0/rows/3/c3": "XID for VACUUM operation moving a row version", "/versions/12/tables/0/rows/4/c2": "6 bytes", "/versions/12/tables/0/rows/4/c3": "current TID of this or newer row version", "/versions/12/tables/0/rows/5/c2": "2 bytes", "/versions/12/tables/0/rows/5/c3": "number of attributes, plus various flag bits", "/versions/12/tables/0/rows/6/c2": "2 bytes", "/versions/12/tables/0/rows/6/c3": "various flag bits", "/versions/12/tables/0/rows/7/c2": "1 byte", "/versions/12/tables/0/rows/7/c3": "offset to user data", "/versions/12/tables/0/columns/0/label": "Field", "/versions/12/tables/0/columns/1/label": "Type", "/versions/12/tables/0/columns/2/label": "Length", "/versions/12/tables/0/columns/3/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "a5c44cc3663427e859decc93b65080728fabdcead5ac47262e5c0c42caac465c"}, "comparison_data": {"layouts": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 bytes", "c3": "insert XID stamp"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 bytes", "c3": "delete XID stamp"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 bytes", "c3": "insert and/or delete CID stamp (overlays with t_xvac)"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 bytes", "c3": "XID for VACUUM operation moving a row version"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 bytes", "c3": "current TID of this or newer row version"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 bytes", "c3": "number of attributes, plus various flag bits"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 bytes", "c3": "various flag bits"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 byte", "c3": "offset to user data"}], "title": "HeapTupleHeaderData Layout", "columns": [{"key": "c0", "label": "Field"}, {"key": "c1", "label": "Type"}, {"key": "c2", "label": "Length"}, {"key": "c3", "label": "Description"}]}]}, "comparison_hash": "7f6e968716966dae8869d6c14f0a6aa229d745d4d4bde899b61eeec58c8d7ea0", "manual_language": "zh"}, "13": {"facts": [], "tables": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u4e8b\u52a1\u7684 XID"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u5220\u9664\u4e8b\u52a1\u7684 XID"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 \u5b57\u8282", "c3": "\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 \u5b57\u8282", "c3": "\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf"}], "title": "HeapTupleHeaderData \u5e03\u5c40", "columns": [{"key": "c0", "label": "\u5b57\u6bb5"}, {"key": "c1", "label": "\u7c7b\u578b"}, {"key": "c2", "label": "\u957f\u5ea6"}, {"key": "c3", "label": "\u8bf4\u660e"}]}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v13.23/postgresql-13.23.tar.bz2", "label": "13.23", "major": "13", "channel": "stable", "revision": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}, "sources": [{"url": "https://pg.center/docs/13/storage-page-layout.html#STORAGE-TUPLE-LAYOUT", "path": "storage-page-layout.html", "label": "PostgreSQL 13 English manual", "sha256": "80fe3b574871fad132942884c7d87a14369d6abc77a38aba7ba3fa84abca6a37", "language": "en", "original_url": "/docs/13/storage-page-layout.html#STORAGE-TUPLE-LAYOUT"}], "sections": [], "signature": "", "description": ["\u7269\u7406\u884c\u9996\u90e8\u3001\u7a7a\u503c\u4f4d\u56fe\u3001\u5bf9\u9f50\u4e0e\u5217\u6570\u636e\u3002"], "manual_html": "<div class=\"sect2\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\">\n<dl class=\"toc\">\n<dt><span class=\"sect2\"><a href=\"/docs/13/storage-page-layout.html#STORAGE-TUPLE-LAYOUT\">69.6.1. \u8868\u884c\u5e03\u5c40</a></span></dt>\n</dl>\n</h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u6240\u6709\u8868\u884c\u7684\u7ed3\u6784\u90fd\u76f8\u540c\u3002\u5b83\u4eec\u90fd\u6709\u4e00\u4e2a\u56fa\u5b9a\u5927\u5c0f\u7684\u5934\u90e8\uff08\u5728\u5927\u591a\u6570\u673a\u5668\u4e0a\u5360 23 \u5b57\u8282\uff09\uff0c\u540e\u9762\u8ddf\u7740\u53ef\u9009\u7684\u7a7a\u503c\u4f4d\u56fe\u3001\u53ef\u9009\u7684\u5bf9\u8c61 ID \u5b57\u6bb5\u4ee5\u53ca\u7528\u6237\u6570\u636e\u3002\u5934\u90e8\u7684\u8be6\u7ec6\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/13/storage-page-layout.html#HEAPTUPLEHEADERDATA-TABLE\" title=\"\u8868\u00a069.4.\u00a0HeapTupleHeaderData \u5e03\u5c40\">\u8868\u00a069.4</a>\u3002\u5b9e\u9645\u7528\u6237\u6570\u636e\uff08\u884c\u7684\u5404\u5217\uff09\u4ece <code class=\"structfield\">t_hoff</code> \u6307\u793a\u7684\u504f\u79fb\u4f4d\u7f6e\u5f00\u59cb\uff0c\u5b83\u5fc5\u987b\u59cb\u7ec8\u662f\u8be5\u5e73\u53f0 MAXALIGN \u5bf9\u9f50\u5355\u4f4d\u7684\u6574\u6570\u500d\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASNULL</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u7a7a\u503c\u4f4d\u56fe\u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u7d27\u968f\u56fa\u5b9a\u5934\u90e8\u4e4b\u540e\uff0c\u5e76\u5360\u7528\u8db3\u591f\u591a\u7684\u5b57\u8282\uff0c\u4ee5\u4fbf\u4e3a\u6bcf\u4e2a\u6570\u636e\u5217\u63d0\u4f9b\u4e00\u4f4d\uff08\u4e5f\u5c31\u662f\u8bf4\uff0c\u5176\u4f4d\u6570\u7b49\u4e8e <code class=\"structfield\">t_infomask2</code> \u4e2d\u7684\u5c5e\u6027\u4e2a\u6570\uff09\u3002\u5728\u8fd9\u4e2a\u4f4d\u56fe\u4e2d\uff0c1 \u8868\u793a\u975e\u7a7a\uff0c0 \u8868\u793a\u7a7a\u503c\u3002\u5f53\u4f4d\u56fe\u4e0d\u5b58\u5728\u65f6\uff0c\u5047\u5b9a\u6240\u6709\u5217\u90fd\u975e\u7a7a\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASOID_OLD</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u5bf9\u8c61 ID \u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u4f4d\u4e8e <code class=\"structfield\">t_hoff</code> \u8fb9\u754c\u4e4b\u524d\u3002\u4e3a\u4e86\u8ba9 <code class=\"structfield\">t_hoff</code> \u6210\u4e3a MAXALIGN \u7684\u6574\u6570\u500d\u6240\u9700\u7684\u4efb\u4f55\u586b\u5145\uff0c\u90fd\u4f1a\u51fa\u73b0\u5728\u7a7a\u503c\u4f4d\u56fe\u4e0e\u5bf9\u8c61 ID \u4e4b\u95f4\u3002\uff08\u8fd9\u53c8\u53cd\u8fc7\u6765\u4fdd\u8bc1\u4e86\u5bf9\u8c61 ID \u7684\u5bf9\u9f50\u662f\u5408\u9002\u7684\u3002\uff09</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a069.4.\u00a0HeapTupleHeaderData \u5e03\u5c40</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u5b57\u6bb5</th>\n<th lang=\"zh\">\u7c7b\u578b</th>\n<th lang=\"zh\">\u957f\u5ea6</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>t_xmin</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_xmax</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u5220\u9664\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_cid</td>\n<td>CommandId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e</td>\n</tr>\n<tr>\n<td>t_xvac</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID</td>\n</tr>\n<tr>\n<td>t_ctid</td>\n<td>ItemPointerData</td>\n<td lang=\"zh\">6 \u5b57\u8282</td>\n<td lang=\"zh\">\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID</td>\n</tr>\n<tr>\n<td>t_infomask2</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_infomask</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_hoff</td>\n<td>uint8</td>\n<td lang=\"zh\">1 \u5b57\u8282</td>\n<td lang=\"zh\">\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u6240\u6709\u7ec6\u8282\u90fd\u53ef\u4ee5\u5728 <code class=\"filename\">src/include/access/htup_details.h</code> \u4e2d\u627e\u5230\u3002</p>\n<p lang=\"zh\">\u8981\u89e3\u91ca\u5b9e\u9645\u6570\u636e\uff0c\u5fc5\u987b\u501f\u52a9\u4ece\u5176\u4ed6\u8868\u4e2d\u83b7\u5f97\u7684\u4fe1\u606f\uff0c\u5176\u4e2d\u5927\u90e8\u5206\u6765\u81ea <code class=\"structname\">pg_attribute</code>\u3002\u8bc6\u522b\u5b57\u6bb5\u4f4d\u7f6e\u6240\u9700\u7684\u5173\u952e\u503c\u662f <code class=\"structfield\">attlen</code> \u548c <code class=\"structfield\">attalign</code>\u3002\u9664\u975e\u6240\u6709\u5b57\u6bb5\u90fd\u662f\u5b9a\u5bbd\u4e14\u6ca1\u6709\u7a7a\u503c\uff0c\u5426\u5219\u6ca1\u6709\u529e\u6cd5\u76f4\u63a5\u53d6\u5f97\u67d0\u4e2a\u7279\u5b9a\u5c5e\u6027\u3002\u6240\u6709\u8fd9\u4e9b\u6280\u5de7\u90fd\u5c01\u88c5\u5728 <em class=\"firstterm\">heap_getattr</em>\u3001<em class=\"firstterm\">fastgetattr</em> \u548c <em class=\"firstterm\">heap_getsysattr</em> \u8fd9\u4e9b\u51fd\u6570\u4e2d\u3002</p>\n<p lang=\"zh\">\u8bfb\u53d6\u6570\u636e\u65f6\uff0c\u9700\u8981\u4f9d\u6b21\u68c0\u67e5\u6bcf\u4e2a\u5c5e\u6027\u3002\u9996\u5148\u6839\u636e\u7a7a\u503c\u4f4d\u56fe\u5224\u65ad\u8be5\u5b57\u6bb5\u662f\u5426\u4e3a NULL\u3002\u5982\u679c\u662f\uff0c\u5c31\u7ee7\u7eed\u4e0b\u4e00\u4e2a\u3002\u7136\u540e\u786e\u8ba4\u5bf9\u9f50\u662f\u5426\u6b63\u786e\u3002\u5982\u679c\u5b57\u6bb5\u662f\u5b9a\u5bbd\u5b57\u6bb5\uff0c\u90a3\u4e48\u5b83\u7684\u6240\u6709\u5b57\u8282\u90fd\u662f\u76f4\u63a5\u6446\u653e\u7684\uff1b\u5982\u679c\u5b83\u662f\u53d8\u957f\u5b57\u6bb5\uff08attlen = -1\uff09\uff0c\u60c5\u51b5\u5c31\u4f1a\u7a0d\u590d\u6742\u4e00\u4e9b\u3002\u6240\u6709\u53d8\u957f\u6570\u636e\u7c7b\u578b\u90fd\u5171\u4eab\u4e00\u4e2a\u901a\u7528\u5934\u90e8\u7ed3\u6784\u4f53 <code class=\"type\">struct varlena</code>\uff0c\u5176\u4e2d\u5305\u542b\u5df2\u5b58\u50a8\u503c\u7684\u603b\u957f\u5ea6\u4ee5\u53ca\u4e00\u4e9b\u6807\u5fd7\u4f4d\u3002\u6839\u636e\u8fd9\u4e9b\u6807\u5fd7\uff0c\u6570\u636e\u53ef\u80fd\u662f\u884c\u5185\u5b58\u50a8\u7684\uff0c\u4e5f\u53ef\u80fd\u4f4d\u4e8e <acronym class=\"acronym\">TOAST</acronym> \u8868\u4e2d\uff1b\u5b83\u4e5f\u53ef\u80fd\u662f\u7ecf\u8fc7\u538b\u7f29\u7684\uff08\u89c1<a class=\"xref\" href=\"/docs/13/storage-toast.html\" title=\"69.2.\u00a0TOAST\">\u7b2c\u00a069.2\u00a0\u8282</a>\uff09\u3002</p>\n</div>", "manual_path": "/docs/13/storage-page-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/13/storage-page-layout.html", "method": "same-major semantic node", "sha256": "8f345d33cebccf663d12f0103dacc41820cd492d575b5faf6bcab66832f8ba39", "language": "zh", "matched_nodes": ["#STORAGE-PAGE-LAYOUT/div[18]/div[2]/p[0]", "#STORAGE-PAGE-LAYOUT/div[18]/p[1]", "#STORAGE-PAGE-LAYOUT/div[18]/p[4]", "#STORAGE-PAGE-LAYOUT/div[18]/p[5]", "#STORAGE-PAGE-LAYOUT/div[18]/p[6]", "#STORAGE-PAGE-LAYOUT/div[1]"]}], "language": "zh", "original_text": {"/versions/13/description/0": "Physical row headers, null bitmap, alignment and column data.", "/versions/13/tables/0/title": "HeapTupleHeaderData Layout", "/versions/13/tables/0/rows/0/c2": "4 bytes", "/versions/13/tables/0/rows/0/c3": "insert XID stamp", "/versions/13/tables/0/rows/1/c2": "4 bytes", "/versions/13/tables/0/rows/1/c3": "delete XID stamp", "/versions/13/tables/0/rows/2/c2": "4 bytes", "/versions/13/tables/0/rows/2/c3": "insert and/or delete CID stamp (overlays with t_xvac)", "/versions/13/tables/0/rows/3/c2": "4 bytes", "/versions/13/tables/0/rows/3/c3": "XID for VACUUM operation moving a row version", "/versions/13/tables/0/rows/4/c2": "6 bytes", "/versions/13/tables/0/rows/4/c3": "current TID of this or newer row version", "/versions/13/tables/0/rows/5/c2": "2 bytes", "/versions/13/tables/0/rows/5/c3": "number of attributes, plus various flag bits", "/versions/13/tables/0/rows/6/c2": "2 bytes", "/versions/13/tables/0/rows/6/c3": "various flag bits", "/versions/13/tables/0/rows/7/c2": "1 byte", "/versions/13/tables/0/rows/7/c3": "offset to user data", "/versions/13/tables/0/columns/0/label": "Field", "/versions/13/tables/0/columns/1/label": "Type", "/versions/13/tables/0/columns/2/label": "Length", "/versions/13/tables/0/columns/3/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "fc10a09e400447404e8c89c11d152dcde3eb1df0d2d6acd682b1f57cab45eb21"}, "comparison_data": {"layouts": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 bytes", "c3": "insert XID stamp"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 bytes", "c3": "delete XID stamp"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 bytes", "c3": "insert and/or delete CID stamp (overlays with t_xvac)"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 bytes", "c3": "XID for VACUUM operation moving a row version"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 bytes", "c3": "current TID of this or newer row version"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 bytes", "c3": "number of attributes, plus various flag bits"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 bytes", "c3": "various flag bits"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 byte", "c3": "offset to user data"}], "title": "HeapTupleHeaderData Layout", "columns": [{"key": "c0", "label": "Field"}, {"key": "c1", "label": "Type"}, {"key": "c2", "label": "Length"}, {"key": "c3", "label": "Description"}]}]}, "comparison_hash": "7f6e968716966dae8869d6c14f0a6aa229d745d4d4bde899b61eeec58c8d7ea0", "manual_language": "zh"}, "14": {"facts": [], "tables": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u4e8b\u52a1\u7684 XID"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u5220\u9664\u4e8b\u52a1\u7684 XID"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 \u5b57\u8282", "c3": "\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 \u5b57\u8282", "c3": "\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf"}], "title": "HeapTupleHeaderData \u5e03\u5c40", "columns": [{"key": "c0", "label": "\u5b57\u6bb5"}, {"key": "c1", "label": "\u7c7b\u578b"}, {"key": "c2", "label": "\u957f\u5ea6"}, {"key": "c3", "label": "\u8bf4\u660e"}]}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "label": "14.24", "major": "14", "channel": "stable", "revision": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}, "sources": [{"url": "https://pg.center/docs/14/storage-page-layout.html#STORAGE-TUPLE-LAYOUT", "path": "storage-page-layout.html", "label": "PostgreSQL 14 English manual", "sha256": "0086151fad97655a71308a5389066374e3e178c423cb855b4084e7a2c3b078c5", "language": "en", "original_url": "/docs/14/storage-page-layout.html#STORAGE-TUPLE-LAYOUT"}], "sections": [], "signature": "", "description": ["\u7269\u7406\u884c\u9996\u90e8\u3001\u7a7a\u503c\u4f4d\u56fe\u3001\u5bf9\u9f50\u4e0e\u5217\u6570\u636e\u3002"], "manual_html": "<div class=\"sect2\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\">\n<dl class=\"toc\">\n<dt><span class=\"sect2\"><a href=\"/docs/14/storage-page-layout.html#STORAGE-TUPLE-LAYOUT\">70.6.1. \u8868\u884c\u5e03\u5c40</a></span></dt>\n</dl>\n</h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u6240\u6709\u8868\u884c\u7684\u7ed3\u6784\u90fd\u76f8\u540c\u3002\u5b83\u4eec\u90fd\u6709\u4e00\u4e2a\u56fa\u5b9a\u5927\u5c0f\u7684\u5934\u90e8\uff08\u5728\u5927\u591a\u6570\u673a\u5668\u4e0a\u5360 23 \u5b57\u8282\uff09\uff0c\u540e\u9762\u8ddf\u7740\u53ef\u9009\u7684\u7a7a\u503c\u4f4d\u56fe\u3001\u53ef\u9009\u7684\u5bf9\u8c61 ID \u5b57\u6bb5\u4ee5\u53ca\u7528\u6237\u6570\u636e\u3002\u5934\u90e8\u7684\u8be6\u7ec6\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/14/storage-page-layout.html#HEAPTUPLEHEADERDATA-TABLE\" title=\"\u8868\u00a070.4.\u00a0HeapTupleHeaderData \u5e03\u5c40\">\u8868\u00a070.4</a>\u3002\u5b9e\u9645\u7528\u6237\u6570\u636e\uff08\u884c\u7684\u5404\u5217\uff09\u4ece <code class=\"structfield\">t_hoff</code> \u6307\u793a\u7684\u504f\u79fb\u4f4d\u7f6e\u5f00\u59cb\uff0c\u5b83\u5fc5\u987b\u59cb\u7ec8\u662f\u8be5\u5e73\u53f0 MAXALIGN \u5bf9\u9f50\u5355\u4f4d\u7684\u6574\u6570\u500d\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASNULL</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u7a7a\u503c\u4f4d\u56fe\u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u7d27\u968f\u56fa\u5b9a\u5934\u90e8\u4e4b\u540e\uff0c\u5e76\u5360\u7528\u8db3\u591f\u591a\u7684\u5b57\u8282\uff0c\u4ee5\u4fbf\u4e3a\u6bcf\u4e2a\u6570\u636e\u5217\u63d0\u4f9b\u4e00\u4f4d\uff08\u4e5f\u5c31\u662f\u8bf4\uff0c\u5176\u4f4d\u6570\u7b49\u4e8e <code class=\"structfield\">t_infomask2</code> \u4e2d\u7684\u5c5e\u6027\u4e2a\u6570\uff09\u3002\u5728\u8fd9\u4e2a\u4f4d\u56fe\u4e2d\uff0c1 \u8868\u793a\u975e\u7a7a\uff0c0 \u8868\u793a\u7a7a\u503c\u3002\u5f53\u4f4d\u56fe\u4e0d\u5b58\u5728\u65f6\uff0c\u5047\u5b9a\u6240\u6709\u5217\u90fd\u975e\u7a7a\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASOID_OLD</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u5bf9\u8c61 ID \u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u4f4d\u4e8e <code class=\"structfield\">t_hoff</code> \u8fb9\u754c\u4e4b\u524d\u3002\u4e3a\u4e86\u8ba9 <code class=\"structfield\">t_hoff</code> \u6210\u4e3a MAXALIGN \u7684\u6574\u6570\u500d\u6240\u9700\u7684\u4efb\u4f55\u586b\u5145\uff0c\u90fd\u4f1a\u51fa\u73b0\u5728\u7a7a\u503c\u4f4d\u56fe\u4e0e\u5bf9\u8c61 ID \u4e4b\u95f4\u3002\uff08\u8fd9\u53c8\u53cd\u8fc7\u6765\u4fdd\u8bc1\u4e86\u5bf9\u8c61 ID \u7684\u5bf9\u9f50\u662f\u5408\u9002\u7684\u3002\uff09</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a070.4.\u00a0HeapTupleHeaderData \u5e03\u5c40</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u5b57\u6bb5</th>\n<th lang=\"zh\">\u7c7b\u578b</th>\n<th lang=\"zh\">\u957f\u5ea6</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>t_xmin</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_xmax</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u5220\u9664\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_cid</td>\n<td>CommandId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e</td>\n</tr>\n<tr>\n<td>t_xvac</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID</td>\n</tr>\n<tr>\n<td>t_ctid</td>\n<td>ItemPointerData</td>\n<td lang=\"zh\">6 \u5b57\u8282</td>\n<td lang=\"zh\">\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID</td>\n</tr>\n<tr>\n<td>t_infomask2</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_infomask</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_hoff</td>\n<td>uint8</td>\n<td lang=\"zh\">1 \u5b57\u8282</td>\n<td lang=\"zh\">\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u6240\u6709\u7ec6\u8282\u90fd\u53ef\u4ee5\u5728 <code class=\"filename\">src/include/access/htup_details.h</code> \u4e2d\u627e\u5230\u3002</p>\n<p lang=\"zh\">\u8981\u89e3\u91ca\u5b9e\u9645\u6570\u636e\uff0c\u5fc5\u987b\u501f\u52a9\u4ece\u5176\u4ed6\u8868\u4e2d\u83b7\u5f97\u7684\u4fe1\u606f\uff0c\u5176\u4e2d\u5927\u90e8\u5206\u6765\u81ea <code class=\"structname\">pg_attribute</code>\u3002\u8bc6\u522b\u5b57\u6bb5\u4f4d\u7f6e\u6240\u9700\u7684\u5173\u952e\u503c\u662f <code class=\"structfield\">attlen</code> \u548c <code class=\"structfield\">attalign</code>\u3002\u9664\u975e\u6240\u6709\u5b57\u6bb5\u90fd\u662f\u5b9a\u5bbd\u4e14\u6ca1\u6709\u7a7a\u503c\uff0c\u5426\u5219\u6ca1\u6709\u529e\u6cd5\u76f4\u63a5\u53d6\u5f97\u67d0\u4e2a\u7279\u5b9a\u5c5e\u6027\u3002\u6240\u6709\u8fd9\u4e9b\u6280\u5de7\u90fd\u5c01\u88c5\u5728 <em class=\"firstterm\">heap_getattr</em>\u3001<em class=\"firstterm\">fastgetattr</em> \u548c <em class=\"firstterm\">heap_getsysattr</em> \u8fd9\u4e9b\u51fd\u6570\u4e2d\u3002</p>\n<p lang=\"zh\">\u8bfb\u53d6\u6570\u636e\u65f6\uff0c\u9700\u8981\u4f9d\u6b21\u68c0\u67e5\u6bcf\u4e2a\u5c5e\u6027\u3002\u9996\u5148\u6839\u636e\u7a7a\u503c\u4f4d\u56fe\u5224\u65ad\u8be5\u5b57\u6bb5\u662f\u5426\u4e3a NULL\u3002\u5982\u679c\u662f\uff0c\u5c31\u7ee7\u7eed\u4e0b\u4e00\u4e2a\u3002\u7136\u540e\u786e\u8ba4\u5bf9\u9f50\u662f\u5426\u6b63\u786e\u3002\u5982\u679c\u5b57\u6bb5\u662f\u5b9a\u5bbd\u5b57\u6bb5\uff0c\u90a3\u4e48\u5b83\u7684\u6240\u6709\u5b57\u8282\u90fd\u662f\u76f4\u63a5\u6446\u653e\u7684\uff1b\u5982\u679c\u5b83\u662f\u53d8\u957f\u5b57\u6bb5\uff08attlen = -1\uff09\uff0c\u60c5\u51b5\u5c31\u4f1a\u7a0d\u590d\u6742\u4e00\u4e9b\u3002\u6240\u6709\u53d8\u957f\u6570\u636e\u7c7b\u578b\u90fd\u5171\u4eab\u4e00\u4e2a\u901a\u7528\u5934\u90e8\u7ed3\u6784\u4f53 <code class=\"type\">struct varlena</code>\uff0c\u5176\u4e2d\u5305\u542b\u5df2\u5b58\u50a8\u503c\u7684\u603b\u957f\u5ea6\u4ee5\u53ca\u4e00\u4e9b\u6807\u5fd7\u4f4d\u3002\u6839\u636e\u8fd9\u4e9b\u6807\u5fd7\uff0c\u6570\u636e\u53ef\u80fd\u662f\u884c\u5185\u5b58\u50a8\u7684\uff0c\u4e5f\u53ef\u80fd\u4f4d\u4e8e <acronym class=\"acronym\">TOAST</acronym> \u8868\u4e2d\uff1b\u5b83\u4e5f\u53ef\u80fd\u662f\u7ecf\u8fc7\u538b\u7f29\u7684\uff08\u89c1<a class=\"xref\" href=\"/docs/14/storage-toast.html\" title=\"70.2.\u00a0TOAST\">\u7b2c\u00a070.2\u00a0\u8282</a>\uff09\u3002</p>\n</div>", "manual_path": "/docs/14/storage-page-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/14/storage-page-layout.html", "method": "same-major semantic node", "sha256": "715a2f826a4e1ec9a3eae2da9e5746928bdaf5a5b7e05ee60ed9eedf4ab90747", "language": "zh", "matched_nodes": ["#STORAGE-PAGE-LAYOUT/div[18]/div[2]/p[0]", "#STORAGE-PAGE-LAYOUT/div[18]/p[1]", "#STORAGE-PAGE-LAYOUT/div[18]/p[4]", "#STORAGE-PAGE-LAYOUT/div[18]/p[5]", "#STORAGE-PAGE-LAYOUT/div[18]/p[6]", "#STORAGE-PAGE-LAYOUT/div[1]"]}], "language": "zh", "original_text": {"/versions/14/description/0": "Physical row headers, null bitmap, alignment and column data.", "/versions/14/tables/0/title": "HeapTupleHeaderData Layout", "/versions/14/tables/0/rows/0/c2": "4 bytes", "/versions/14/tables/0/rows/0/c3": "insert XID stamp", "/versions/14/tables/0/rows/1/c2": "4 bytes", "/versions/14/tables/0/rows/1/c3": "delete XID stamp", "/versions/14/tables/0/rows/2/c2": "4 bytes", "/versions/14/tables/0/rows/2/c3": "insert and/or delete CID stamp (overlays with t_xvac)", "/versions/14/tables/0/rows/3/c2": "4 bytes", "/versions/14/tables/0/rows/3/c3": "XID for VACUUM operation moving a row version", "/versions/14/tables/0/rows/4/c2": "6 bytes", "/versions/14/tables/0/rows/4/c3": "current TID of this or newer row version", "/versions/14/tables/0/rows/5/c2": "2 bytes", "/versions/14/tables/0/rows/5/c3": "number of attributes, plus various flag bits", "/versions/14/tables/0/rows/6/c2": "2 bytes", "/versions/14/tables/0/rows/6/c3": "various flag bits", "/versions/14/tables/0/rows/7/c2": "1 byte", "/versions/14/tables/0/rows/7/c3": "offset to user data", "/versions/14/tables/0/columns/0/label": "Field", "/versions/14/tables/0/columns/1/label": "Type", "/versions/14/tables/0/columns/2/label": "Length", "/versions/14/tables/0/columns/3/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "424eb32b16be0b88ef5927168b40e768999cdc14916b17e4189b54d55e07a824"}, "comparison_data": {"layouts": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 bytes", "c3": "insert XID stamp"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 bytes", "c3": "delete XID stamp"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 bytes", "c3": "insert and/or delete CID stamp (overlays with t_xvac)"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 bytes", "c3": "XID for VACUUM operation moving a row version"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 bytes", "c3": "current TID of this or newer row version"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 bytes", "c3": "number of attributes, plus various flag bits"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 bytes", "c3": "various flag bits"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 byte", "c3": "offset to user data"}], "title": "HeapTupleHeaderData Layout", "columns": [{"key": "c0", "label": "Field"}, {"key": "c1", "label": "Type"}, {"key": "c2", "label": "Length"}, {"key": "c3", "label": "Description"}]}]}, "comparison_hash": "7f6e968716966dae8869d6c14f0a6aa229d745d4d4bde899b61eeec58c8d7ea0", "manual_language": "zh"}, "15": {"facts": [], "tables": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u4e8b\u52a1\u7684 XID"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u5220\u9664\u4e8b\u52a1\u7684 XID"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 \u5b57\u8282", "c3": "\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 \u5b57\u8282", "c3": "\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf"}], "title": "HeapTupleHeaderData \u5e03\u5c40", "columns": [{"key": "c0", "label": "\u5b57\u6bb5"}, {"key": "c1", "label": "\u7c7b\u578b"}, {"key": "c2", "label": "\u957f\u5ea6"}, {"key": "c3", "label": "\u8bf4\u660e"}]}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "label": "15.19", "major": "15", "channel": "stable", "revision": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}, "sources": [{"url": "https://pg.center/docs/15/storage-page-layout.html#STORAGE-TUPLE-LAYOUT", "path": "storage-page-layout.html", "label": "PostgreSQL 15 English manual", "sha256": "88f0ede4c4e120bd501055521215dd74f073965c658098e4b694f28e5fb427b5", "language": "en", "original_url": "/docs/15/storage-page-layout.html#STORAGE-TUPLE-LAYOUT"}], "sections": [], "signature": "", "description": ["\u7269\u7406\u884c\u9996\u90e8\u3001\u7a7a\u503c\u4f4d\u56fe\u3001\u5bf9\u9f50\u4e0e\u5217\u6570\u636e\u3002"], "manual_html": "<div class=\"sect2\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\">\n<dl class=\"toc\">\n<dt><span class=\"sect2\"><a href=\"/docs/15/storage-page-layout.html#STORAGE-TUPLE-LAYOUT\">73.6.1. \u8868\u884c\u5e03\u5c40</a></span></dt>\n</dl>\n</h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u6240\u6709\u8868\u884c\u7684\u7ed3\u6784\u90fd\u76f8\u540c\u3002\u5b83\u4eec\u90fd\u6709\u4e00\u4e2a\u56fa\u5b9a\u5927\u5c0f\u7684\u5934\u90e8\uff08\u5728\u5927\u591a\u6570\u673a\u5668\u4e0a\u5360 23 \u5b57\u8282\uff09\uff0c\u540e\u9762\u8ddf\u7740\u53ef\u9009\u7684\u7a7a\u503c\u4f4d\u56fe\u3001\u53ef\u9009\u7684\u5bf9\u8c61 ID \u5b57\u6bb5\u4ee5\u53ca\u7528\u6237\u6570\u636e\u3002\u5934\u90e8\u7684\u8be6\u7ec6\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/15/storage-page-layout.html#HEAPTUPLEHEADERDATA-TABLE\" title=\"\u8868\u00a073.4.\u00a0HeapTupleHeaderData \u5e03\u5c40\">\u8868\u00a073.4</a>\u3002\u5b9e\u9645\u7528\u6237\u6570\u636e\uff08\u884c\u7684\u5404\u5217\uff09\u4ece <code class=\"structfield\">t_hoff</code> \u6307\u793a\u7684\u504f\u79fb\u4f4d\u7f6e\u5f00\u59cb\uff0c\u5b83\u5fc5\u987b\u59cb\u7ec8\u662f\u8be5\u5e73\u53f0 MAXALIGN \u5bf9\u9f50\u5355\u4f4d\u7684\u6574\u6570\u500d\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASNULL</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u7a7a\u503c\u4f4d\u56fe\u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u7d27\u968f\u56fa\u5b9a\u5934\u90e8\u4e4b\u540e\uff0c\u5e76\u5360\u7528\u8db3\u591f\u591a\u7684\u5b57\u8282\uff0c\u4ee5\u4fbf\u4e3a\u6bcf\u4e2a\u6570\u636e\u5217\u63d0\u4f9b\u4e00\u4f4d\uff08\u4e5f\u5c31\u662f\u8bf4\uff0c\u5176\u4f4d\u6570\u7b49\u4e8e <code class=\"structfield\">t_infomask2</code> \u4e2d\u7684\u5c5e\u6027\u4e2a\u6570\uff09\u3002\u5728\u8fd9\u4e2a\u4f4d\u56fe\u4e2d\uff0c1 \u8868\u793a\u975e\u7a7a\uff0c0 \u8868\u793a\u7a7a\u503c\u3002\u5f53\u4f4d\u56fe\u4e0d\u5b58\u5728\u65f6\uff0c\u5047\u5b9a\u6240\u6709\u5217\u90fd\u975e\u7a7a\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASOID_OLD</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u5bf9\u8c61 ID \u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u4f4d\u4e8e <code class=\"structfield\">t_hoff</code> \u8fb9\u754c\u4e4b\u524d\u3002\u4e3a\u4e86\u8ba9 <code class=\"structfield\">t_hoff</code> \u6210\u4e3a MAXALIGN \u7684\u6574\u6570\u500d\u6240\u9700\u7684\u4efb\u4f55\u586b\u5145\uff0c\u90fd\u4f1a\u51fa\u73b0\u5728\u7a7a\u503c\u4f4d\u56fe\u4e0e\u5bf9\u8c61 ID \u4e4b\u95f4\u3002\uff08\u8fd9\u53c8\u53cd\u8fc7\u6765\u4fdd\u8bc1\u4e86\u5bf9\u8c61 ID \u7684\u5bf9\u9f50\u662f\u5408\u9002\u7684\u3002\uff09</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a073.4.\u00a0HeapTupleHeaderData \u5e03\u5c40</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u5b57\u6bb5</th>\n<th lang=\"zh\">\u7c7b\u578b</th>\n<th lang=\"zh\">\u957f\u5ea6</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>t_xmin</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_xmax</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u5220\u9664\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_cid</td>\n<td>CommandId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e</td>\n</tr>\n<tr>\n<td>t_xvac</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID</td>\n</tr>\n<tr>\n<td>t_ctid</td>\n<td>ItemPointerData</td>\n<td lang=\"zh\">6 \u5b57\u8282</td>\n<td lang=\"zh\">\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID</td>\n</tr>\n<tr>\n<td>t_infomask2</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_infomask</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_hoff</td>\n<td>uint8</td>\n<td lang=\"zh\">1 \u5b57\u8282</td>\n<td lang=\"zh\">\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u6240\u6709\u7ec6\u8282\u90fd\u53ef\u4ee5\u5728 <code class=\"filename\">src/include/access/htup_details.h</code> \u4e2d\u627e\u5230\u3002</p>\n<p lang=\"zh\">\u8981\u89e3\u91ca\u5b9e\u9645\u6570\u636e\uff0c\u5fc5\u987b\u501f\u52a9\u4ece\u5176\u4ed6\u8868\u4e2d\u83b7\u5f97\u7684\u4fe1\u606f\uff0c\u5176\u4e2d\u5927\u90e8\u5206\u6765\u81ea <code class=\"structname\">pg_attribute</code>\u3002\u8bc6\u522b\u5b57\u6bb5\u4f4d\u7f6e\u6240\u9700\u7684\u5173\u952e\u503c\u662f <code class=\"structfield\">attlen</code> \u548c <code class=\"structfield\">attalign</code>\u3002\u9664\u975e\u6240\u6709\u5b57\u6bb5\u90fd\u662f\u5b9a\u5bbd\u4e14\u6ca1\u6709\u7a7a\u503c\uff0c\u5426\u5219\u6ca1\u6709\u529e\u6cd5\u76f4\u63a5\u53d6\u5f97\u67d0\u4e2a\u7279\u5b9a\u5c5e\u6027\u3002\u6240\u6709\u8fd9\u4e9b\u6280\u5de7\u90fd\u5c01\u88c5\u5728 <em class=\"firstterm\">heap_getattr</em>\u3001<em class=\"firstterm\">fastgetattr</em> \u548c <em class=\"firstterm\">heap_getsysattr</em> \u8fd9\u4e9b\u51fd\u6570\u4e2d\u3002</p>\n<p lang=\"zh\">\u8bfb\u53d6\u6570\u636e\u65f6\uff0c\u9700\u8981\u4f9d\u6b21\u68c0\u67e5\u6bcf\u4e2a\u5c5e\u6027\u3002\u9996\u5148\u6839\u636e\u7a7a\u503c\u4f4d\u56fe\u5224\u65ad\u8be5\u5b57\u6bb5\u662f\u5426\u4e3a NULL\u3002\u5982\u679c\u662f\uff0c\u5c31\u7ee7\u7eed\u4e0b\u4e00\u4e2a\u3002\u7136\u540e\u786e\u8ba4\u5bf9\u9f50\u662f\u5426\u6b63\u786e\u3002\u5982\u679c\u5b57\u6bb5\u662f\u5b9a\u5bbd\u5b57\u6bb5\uff0c\u90a3\u4e48\u5b83\u7684\u6240\u6709\u5b57\u8282\u90fd\u662f\u76f4\u63a5\u6446\u653e\u7684\uff1b\u5982\u679c\u5b83\u662f\u53d8\u957f\u5b57\u6bb5\uff08attlen = -1\uff09\uff0c\u60c5\u51b5\u5c31\u4f1a\u7a0d\u590d\u6742\u4e00\u4e9b\u3002\u6240\u6709\u53d8\u957f\u6570\u636e\u7c7b\u578b\u90fd\u5171\u4eab\u4e00\u4e2a\u901a\u7528\u5934\u90e8\u7ed3\u6784\u4f53 <code class=\"type\">struct varlena</code>\uff0c\u5176\u4e2d\u5305\u542b\u5df2\u5b58\u50a8\u503c\u7684\u603b\u957f\u5ea6\u4ee5\u53ca\u4e00\u4e9b\u6807\u5fd7\u4f4d\u3002\u6839\u636e\u8fd9\u4e9b\u6807\u5fd7\uff0c\u6570\u636e\u53ef\u80fd\u662f\u884c\u5185\u5b58\u50a8\u7684\uff0c\u4e5f\u53ef\u80fd\u4f4d\u4e8e <acronym class=\"acronym\">TOAST</acronym> \u8868\u4e2d\uff1b\u5b83\u4e5f\u53ef\u80fd\u662f\u7ecf\u8fc7\u538b\u7f29\u7684\uff08\u89c1<a class=\"xref\" href=\"/docs/15/storage-toast.html\" title=\"73.2.\u00a0TOAST\">\u7b2c\u00a073.2\u00a0\u8282</a>\uff09\u3002</p>\n</div>", "manual_path": "/docs/15/storage-page-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/15/storage-page-layout.html", "method": "same-major semantic node", "sha256": "2c2602d84ed184bdd78e6473fd991c8f64d4e6921371324f0d349f423eba5718", "language": "zh", "matched_nodes": ["#STORAGE-PAGE-LAYOUT/div[18]/div[2]/p[0]", "#STORAGE-PAGE-LAYOUT/div[18]/p[1]", "#STORAGE-PAGE-LAYOUT/div[18]/p[4]", "#STORAGE-PAGE-LAYOUT/div[18]/p[5]", "#STORAGE-PAGE-LAYOUT/div[18]/p[6]", "#STORAGE-PAGE-LAYOUT/div[1]"]}], "language": "zh", "original_text": {"/versions/15/description/0": "Physical row headers, null bitmap, alignment and column data.", "/versions/15/tables/0/title": "HeapTupleHeaderData Layout", "/versions/15/tables/0/rows/0/c2": "4 bytes", "/versions/15/tables/0/rows/0/c3": "insert XID stamp", "/versions/15/tables/0/rows/1/c2": "4 bytes", "/versions/15/tables/0/rows/1/c3": "delete XID stamp", "/versions/15/tables/0/rows/2/c2": "4 bytes", "/versions/15/tables/0/rows/2/c3": "insert and/or delete CID stamp (overlays with t_xvac)", "/versions/15/tables/0/rows/3/c2": "4 bytes", "/versions/15/tables/0/rows/3/c3": "XID for VACUUM operation moving a row version", "/versions/15/tables/0/rows/4/c2": "6 bytes", "/versions/15/tables/0/rows/4/c3": "current TID of this or newer row version", "/versions/15/tables/0/rows/5/c2": "2 bytes", "/versions/15/tables/0/rows/5/c3": "number of attributes, plus various flag bits", "/versions/15/tables/0/rows/6/c2": "2 bytes", "/versions/15/tables/0/rows/6/c3": "various flag bits", "/versions/15/tables/0/rows/7/c2": "1 byte", "/versions/15/tables/0/rows/7/c3": "offset to user data", "/versions/15/tables/0/columns/0/label": "Field", "/versions/15/tables/0/columns/1/label": "Type", "/versions/15/tables/0/columns/2/label": "Length", "/versions/15/tables/0/columns/3/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "377d9d40632562901f2602b55d9f6866bd5d04ce81bc4dbb5f0a65ee9172a542"}, "comparison_data": {"layouts": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 bytes", "c3": "insert XID stamp"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 bytes", "c3": "delete XID stamp"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 bytes", "c3": "insert and/or delete CID stamp (overlays with t_xvac)"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 bytes", "c3": "XID for VACUUM operation moving a row version"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 bytes", "c3": "current TID of this or newer row version"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 bytes", "c3": "number of attributes, plus various flag bits"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 bytes", "c3": "various flag bits"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 byte", "c3": "offset to user data"}], "title": "HeapTupleHeaderData Layout", "columns": [{"key": "c0", "label": "Field"}, {"key": "c1", "label": "Type"}, {"key": "c2", "label": "Length"}, {"key": "c3", "label": "Description"}]}]}, "comparison_hash": "7f6e968716966dae8869d6c14f0a6aa229d745d4d4bde899b61eeec58c8d7ea0", "manual_language": "zh"}, "16": {"facts": [], "tables": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u4e8b\u52a1\u7684 XID"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u5220\u9664\u4e8b\u52a1\u7684 XID"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 \u5b57\u8282", "c3": "\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 \u5b57\u8282", "c3": "\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf"}], "title": "HeapTupleHeaderData \u5e03\u5c40", "columns": [{"key": "c0", "label": "\u5b57\u6bb5"}, {"key": "c1", "label": "\u7c7b\u578b"}, {"key": "c2", "label": "\u957f\u5ea6"}, {"key": "c3", "label": "\u8bf4\u660e"}]}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "label": "16.15", "major": "16", "channel": "stable", "revision": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}, "sources": [{"url": "https://pg.center/docs/16/storage-page-layout.html#STORAGE-TUPLE-LAYOUT", "path": "storage-page-layout.html", "label": "PostgreSQL 16 English manual", "sha256": "8575d1a8e8bb10ffdccc043783fce8d53e59bd6e98f1cd66b3761a90d4d77c27", "language": "en", "original_url": "/docs/16/storage-page-layout.html#STORAGE-TUPLE-LAYOUT"}], "sections": [], "signature": "", "description": ["\u7269\u7406\u884c\u9996\u90e8\u3001\u7a7a\u503c\u4f4d\u56fe\u3001\u5bf9\u9f50\u4e0e\u5217\u6570\u636e\u3002"], "manual_html": "<div class=\"sect2\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\">\n<dl class=\"toc\">\n<dt><span class=\"sect2\"><a href=\"/docs/16/storage-page-layout.html#STORAGE-TUPLE-LAYOUT\">73.6.1. \u8868\u884c\u5e03\u5c40</a></span></dt>\n</dl>\n</h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u6240\u6709\u8868\u884c\u7684\u7ed3\u6784\u90fd\u76f8\u540c\u3002\u5b83\u4eec\u90fd\u6709\u4e00\u4e2a\u56fa\u5b9a\u5927\u5c0f\u7684\u5934\u90e8\uff08\u5728\u5927\u591a\u6570\u673a\u5668\u4e0a\u5360 23 \u5b57\u8282\uff09\uff0c\u540e\u9762\u8ddf\u7740\u53ef\u9009\u7684\u7a7a\u503c\u4f4d\u56fe\u3001\u53ef\u9009\u7684\u5bf9\u8c61 ID \u5b57\u6bb5\u4ee5\u53ca\u7528\u6237\u6570\u636e\u3002\u5934\u90e8\u7684\u8be6\u7ec6\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/16/storage-page-layout.html#HEAPTUPLEHEADERDATA-TABLE\" title=\"\u8868\u00a073.4.\u00a0HeapTupleHeaderData \u5e03\u5c40\">\u8868\u00a073.4</a>\u3002\u5b9e\u9645\u7528\u6237\u6570\u636e\uff08\u884c\u7684\u5404\u5217\uff09\u4ece <code class=\"structfield\">t_hoff</code> \u6307\u793a\u7684\u504f\u79fb\u4f4d\u7f6e\u5f00\u59cb\uff0c\u5b83\u5fc5\u987b\u59cb\u7ec8\u662f\u8be5\u5e73\u53f0 MAXALIGN \u5bf9\u9f50\u5355\u4f4d\u7684\u6574\u6570\u500d\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASNULL</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u7a7a\u503c\u4f4d\u56fe\u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u7d27\u968f\u56fa\u5b9a\u5934\u90e8\u4e4b\u540e\uff0c\u5e76\u5360\u7528\u8db3\u591f\u591a\u7684\u5b57\u8282\uff0c\u4ee5\u4fbf\u4e3a\u6bcf\u4e2a\u6570\u636e\u5217\u63d0\u4f9b\u4e00\u4f4d\uff08\u4e5f\u5c31\u662f\u8bf4\uff0c\u5176\u4f4d\u6570\u7b49\u4e8e <code class=\"structfield\">t_infomask2</code> \u4e2d\u7684\u5c5e\u6027\u4e2a\u6570\uff09\u3002\u5728\u8fd9\u4e2a\u4f4d\u56fe\u4e2d\uff0c1 \u8868\u793a\u975e\u7a7a\uff0c0 \u8868\u793a\u7a7a\u503c\u3002\u5f53\u4f4d\u56fe\u4e0d\u5b58\u5728\u65f6\uff0c\u5047\u5b9a\u6240\u6709\u5217\u90fd\u975e\u7a7a\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASOID_OLD</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u5bf9\u8c61 ID \u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u4f4d\u4e8e <code class=\"structfield\">t_hoff</code> \u8fb9\u754c\u4e4b\u524d\u3002\u4e3a\u4e86\u8ba9 <code class=\"structfield\">t_hoff</code> \u6210\u4e3a MAXALIGN \u7684\u6574\u6570\u500d\u6240\u9700\u7684\u4efb\u4f55\u586b\u5145\uff0c\u90fd\u4f1a\u51fa\u73b0\u5728\u7a7a\u503c\u4f4d\u56fe\u4e0e\u5bf9\u8c61 ID \u4e4b\u95f4\u3002\uff08\u8fd9\u53c8\u53cd\u8fc7\u6765\u4fdd\u8bc1\u4e86\u5bf9\u8c61 ID \u7684\u5bf9\u9f50\u662f\u5408\u9002\u7684\u3002\uff09</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a073.4.\u00a0HeapTupleHeaderData \u5e03\u5c40</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u5b57\u6bb5</th>\n<th lang=\"zh\">\u7c7b\u578b</th>\n<th lang=\"zh\">\u957f\u5ea6</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>t_xmin</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_xmax</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u5220\u9664\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_cid</td>\n<td>CommandId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e</td>\n</tr>\n<tr>\n<td>t_xvac</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID</td>\n</tr>\n<tr>\n<td>t_ctid</td>\n<td>ItemPointerData</td>\n<td lang=\"zh\">6 \u5b57\u8282</td>\n<td lang=\"zh\">\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID</td>\n</tr>\n<tr>\n<td>t_infomask2</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_infomask</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_hoff</td>\n<td>uint8</td>\n<td lang=\"zh\">1 \u5b57\u8282</td>\n<td lang=\"zh\">\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u6240\u6709\u7ec6\u8282\u90fd\u53ef\u4ee5\u5728 <code class=\"filename\">src/include/access/htup_details.h</code> \u4e2d\u627e\u5230\u3002</p>\n<p lang=\"zh\">\u8981\u89e3\u91ca\u5b9e\u9645\u6570\u636e\uff0c\u5fc5\u987b\u501f\u52a9\u4ece\u5176\u4ed6\u8868\u4e2d\u83b7\u5f97\u7684\u4fe1\u606f\uff0c\u5176\u4e2d\u5927\u90e8\u5206\u6765\u81ea <code class=\"structname\">pg_attribute</code>\u3002\u8bc6\u522b\u5b57\u6bb5\u4f4d\u7f6e\u6240\u9700\u7684\u5173\u952e\u503c\u662f <code class=\"structfield\">attlen</code> \u548c <code class=\"structfield\">attalign</code>\u3002\u9664\u975e\u6240\u6709\u5b57\u6bb5\u90fd\u662f\u5b9a\u5bbd\u4e14\u6ca1\u6709\u7a7a\u503c\uff0c\u5426\u5219\u6ca1\u6709\u529e\u6cd5\u76f4\u63a5\u53d6\u5f97\u67d0\u4e2a\u7279\u5b9a\u5c5e\u6027\u3002\u6240\u6709\u8fd9\u4e9b\u6280\u5de7\u90fd\u5c01\u88c5\u5728 <em class=\"firstterm\">heap_getattr</em>\u3001<em class=\"firstterm\">fastgetattr</em> \u548c <em class=\"firstterm\">heap_getsysattr</em> \u8fd9\u4e9b\u51fd\u6570\u4e2d\u3002</p>\n<p lang=\"zh\">\u8bfb\u53d6\u6570\u636e\u65f6\uff0c\u9700\u8981\u4f9d\u6b21\u68c0\u67e5\u6bcf\u4e2a\u5c5e\u6027\u3002\u9996\u5148\u6839\u636e\u7a7a\u503c\u4f4d\u56fe\u5224\u65ad\u8be5\u5b57\u6bb5\u662f\u5426\u4e3a NULL\u3002\u5982\u679c\u662f\uff0c\u5c31\u7ee7\u7eed\u4e0b\u4e00\u4e2a\u3002\u7136\u540e\u786e\u8ba4\u5bf9\u9f50\u662f\u5426\u6b63\u786e\u3002\u5982\u679c\u5b57\u6bb5\u662f\u5b9a\u5bbd\u5b57\u6bb5\uff0c\u90a3\u4e48\u5b83\u7684\u6240\u6709\u5b57\u8282\u90fd\u662f\u76f4\u63a5\u6446\u653e\u7684\uff1b\u5982\u679c\u5b83\u662f\u53d8\u957f\u5b57\u6bb5\uff08attlen = -1\uff09\uff0c\u60c5\u51b5\u5c31\u4f1a\u7a0d\u590d\u6742\u4e00\u4e9b\u3002\u6240\u6709\u53d8\u957f\u6570\u636e\u7c7b\u578b\u90fd\u5171\u4eab\u4e00\u4e2a\u901a\u7528\u5934\u90e8\u7ed3\u6784\u4f53 <code class=\"type\">struct varlena</code>\uff0c\u5176\u4e2d\u5305\u542b\u5df2\u5b58\u50a8\u503c\u7684\u603b\u957f\u5ea6\u4ee5\u53ca\u4e00\u4e9b\u6807\u5fd7\u4f4d\u3002\u6839\u636e\u8fd9\u4e9b\u6807\u5fd7\uff0c\u6570\u636e\u53ef\u80fd\u662f\u884c\u5185\u5b58\u50a8\u7684\uff0c\u4e5f\u53ef\u80fd\u4f4d\u4e8e <acronym class=\"acronym\">TOAST</acronym> \u8868\u4e2d\uff1b\u5b83\u4e5f\u53ef\u80fd\u662f\u7ecf\u8fc7\u538b\u7f29\u7684\uff08\u89c1<a class=\"xref\" href=\"/docs/16/storage-toast.html\" title=\"73.2.\u00a0TOAST\">\u7b2c\u00a073.2\u00a0\u8282</a>\uff09\u3002</p>\n</div>", "manual_path": "/docs/16/storage-page-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/16/storage-page-layout.html", "method": "same-major semantic node", "sha256": "bf698675faf9fb84f4a709e4067ed25bc2ecbc55b98c2ea893349308b5af9d43", "language": "zh", "matched_nodes": ["#STORAGE-PAGE-LAYOUT/div[18]/div[2]/p[0]", "#STORAGE-PAGE-LAYOUT/div[18]/p[1]", "#STORAGE-PAGE-LAYOUT/div[18]/p[4]", "#STORAGE-PAGE-LAYOUT/div[18]/p[5]", "#STORAGE-PAGE-LAYOUT/div[18]/p[6]", "#STORAGE-PAGE-LAYOUT/div[1]"]}], "language": "zh", "original_text": {"/versions/16/description/0": "Physical row headers, null bitmap, alignment and column data.", "/versions/16/tables/0/title": "HeapTupleHeaderData Layout", "/versions/16/tables/0/rows/0/c2": "4 bytes", "/versions/16/tables/0/rows/0/c3": "insert XID stamp", "/versions/16/tables/0/rows/1/c2": "4 bytes", "/versions/16/tables/0/rows/1/c3": "delete XID stamp", "/versions/16/tables/0/rows/2/c2": "4 bytes", "/versions/16/tables/0/rows/2/c3": "insert and/or delete CID stamp (overlays with t_xvac)", "/versions/16/tables/0/rows/3/c2": "4 bytes", "/versions/16/tables/0/rows/3/c3": "XID for VACUUM operation moving a row version", "/versions/16/tables/0/rows/4/c2": "6 bytes", "/versions/16/tables/0/rows/4/c3": "current TID of this or newer row version", "/versions/16/tables/0/rows/5/c2": "2 bytes", "/versions/16/tables/0/rows/5/c3": "number of attributes, plus various flag bits", "/versions/16/tables/0/rows/6/c2": "2 bytes", "/versions/16/tables/0/rows/6/c3": "various flag bits", "/versions/16/tables/0/rows/7/c2": "1 byte", "/versions/16/tables/0/rows/7/c3": "offset to user data", "/versions/16/tables/0/columns/0/label": "Field", "/versions/16/tables/0/columns/1/label": "Type", "/versions/16/tables/0/columns/2/label": "Length", "/versions/16/tables/0/columns/3/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "4bb0403b362db23df0870a560b6e09037a75b65060f1300af0378eeefec525bc"}, "comparison_data": {"layouts": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 bytes", "c3": "insert XID stamp"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 bytes", "c3": "delete XID stamp"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 bytes", "c3": "insert and/or delete CID stamp (overlays with t_xvac)"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 bytes", "c3": "XID for VACUUM operation moving a row version"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 bytes", "c3": "current TID of this or newer row version"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 bytes", "c3": "number of attributes, plus various flag bits"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 bytes", "c3": "various flag bits"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 byte", "c3": "offset to user data"}], "title": "HeapTupleHeaderData Layout", "columns": [{"key": "c0", "label": "Field"}, {"key": "c1", "label": "Type"}, {"key": "c2", "label": "Length"}, {"key": "c3", "label": "Description"}]}]}, "comparison_hash": "7f6e968716966dae8869d6c14f0a6aa229d745d4d4bde899b61eeec58c8d7ea0", "manual_language": "zh"}, "17": {"facts": [], "tables": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u4e8b\u52a1\u7684 XID"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u5220\u9664\u4e8b\u52a1\u7684 XID"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 \u5b57\u8282", "c3": "\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 \u5b57\u8282", "c3": "\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf"}], "title": "HeapTupleHeaderData \u5e03\u5c40", "columns": [{"key": "c0", "label": "\u5b57\u6bb5"}, {"key": "c1", "label": "\u7c7b\u578b"}, {"key": "c2", "label": "\u957f\u5ea6"}, {"key": "c3", "label": "\u8bf4\u660e"}]}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "label": "17.11", "major": "17", "channel": "stable", "revision": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, "sources": [{"url": "https://pg.center/docs/17/storage-page-layout.html#STORAGE-TUPLE-LAYOUT", "path": "storage-page-layout.html", "label": "PostgreSQL 17 English manual", "sha256": "4ce2b67f1bce18b942c991f7f9ea2c9e048b128ca179967c5e5ae26336262876", "language": "en", "original_url": "/docs/17/storage-page-layout.html#STORAGE-TUPLE-LAYOUT"}], "sections": [], "signature": "", "description": ["\u7269\u7406\u884c\u9996\u90e8\u3001\u7a7a\u503c\u4f4d\u56fe\u3001\u5bf9\u9f50\u4e0e\u5217\u6570\u636e\u3002"], "manual_html": "<div class=\"sect2\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\">\n<dl class=\"toc\">\n<dt><span class=\"sect2\"><a href=\"/docs/17/storage-page-layout.html#STORAGE-TUPLE-LAYOUT\">65.6.1. \u8868\u884c\u5e03\u5c40</a></span></dt>\n</dl>\n</h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u6240\u6709\u8868\u884c\u7684\u7ed3\u6784\u90fd\u76f8\u540c\u3002\u5b83\u4eec\u90fd\u6709\u4e00\u4e2a\u56fa\u5b9a\u5927\u5c0f\u7684\u5934\u90e8\uff08\u5728\u5927\u591a\u6570\u673a\u5668\u4e0a\u5360 23 \u5b57\u8282\uff09\uff0c\u540e\u9762\u8ddf\u7740\u53ef\u9009\u7684\u7a7a\u503c\u4f4d\u56fe\u3001\u53ef\u9009\u7684\u5bf9\u8c61 ID \u5b57\u6bb5\u4ee5\u53ca\u7528\u6237\u6570\u636e\u3002\u5934\u90e8\u7684\u8be6\u7ec6\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/17/storage-page-layout.html#HEAPTUPLEHEADERDATA-TABLE\" title=\"\u8868\u00a065.4.\u00a0HeapTupleHeaderData \u5e03\u5c40\">\u8868\u00a065.4</a>\u3002\u5b9e\u9645\u7528\u6237\u6570\u636e\uff08\u884c\u7684\u5404\u5217\uff09\u4ece <code class=\"structfield\">t_hoff</code> \u6307\u793a\u7684\u504f\u79fb\u4f4d\u7f6e\u5f00\u59cb\uff0c\u5b83\u5fc5\u987b\u59cb\u7ec8\u662f\u8be5\u5e73\u53f0 MAXALIGN \u5bf9\u9f50\u5355\u4f4d\u7684\u6574\u6570\u500d\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASNULL</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u7a7a\u503c\u4f4d\u56fe\u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u7d27\u968f\u56fa\u5b9a\u5934\u90e8\u4e4b\u540e\uff0c\u5e76\u5360\u7528\u8db3\u591f\u591a\u7684\u5b57\u8282\uff0c\u4ee5\u4fbf\u4e3a\u6bcf\u4e2a\u6570\u636e\u5217\u63d0\u4f9b\u4e00\u4f4d\uff08\u4e5f\u5c31\u662f\u8bf4\uff0c\u5176\u4f4d\u6570\u7b49\u4e8e <code class=\"structfield\">t_infomask2</code> \u4e2d\u7684\u5c5e\u6027\u4e2a\u6570\uff09\u3002\u5728\u8fd9\u4e2a\u4f4d\u56fe\u4e2d\uff0c1 \u8868\u793a\u975e\u7a7a\uff0c0 \u8868\u793a\u7a7a\u503c\u3002\u5f53\u4f4d\u56fe\u4e0d\u5b58\u5728\u65f6\uff0c\u5047\u5b9a\u6240\u6709\u5217\u90fd\u975e\u7a7a\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASOID_OLD</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u5bf9\u8c61 ID \u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u4f4d\u4e8e <code class=\"structfield\">t_hoff</code> \u8fb9\u754c\u4e4b\u524d\u3002\u4e3a\u4e86\u8ba9 <code class=\"structfield\">t_hoff</code> \u6210\u4e3a MAXALIGN \u7684\u6574\u6570\u500d\u6240\u9700\u7684\u4efb\u4f55\u586b\u5145\uff0c\u90fd\u4f1a\u51fa\u73b0\u5728\u7a7a\u503c\u4f4d\u56fe\u4e0e\u5bf9\u8c61 ID \u4e4b\u95f4\u3002\uff08\u8fd9\u53c8\u53cd\u8fc7\u6765\u4fdd\u8bc1\u4e86\u5bf9\u8c61 ID \u7684\u5bf9\u9f50\u662f\u5408\u9002\u7684\u3002\uff09</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a065.4.\u00a0HeapTupleHeaderData \u5e03\u5c40</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u5b57\u6bb5</th>\n<th lang=\"zh\">\u7c7b\u578b</th>\n<th lang=\"zh\">\u957f\u5ea6</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>t_xmin</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_xmax</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u5220\u9664\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_cid</td>\n<td>CommandId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e</td>\n</tr>\n<tr>\n<td>t_xvac</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID</td>\n</tr>\n<tr>\n<td>t_ctid</td>\n<td>ItemPointerData</td>\n<td lang=\"zh\">6 \u5b57\u8282</td>\n<td lang=\"zh\">\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID</td>\n</tr>\n<tr>\n<td>t_infomask2</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_infomask</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_hoff</td>\n<td>uint8</td>\n<td lang=\"zh\">1 \u5b57\u8282</td>\n<td lang=\"zh\">\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u6240\u6709\u7ec6\u8282\u90fd\u53ef\u4ee5\u5728 <code class=\"filename\">src/include/access/htup_details.h</code> \u4e2d\u627e\u5230\u3002</p>\n<p lang=\"zh\">\u8981\u89e3\u91ca\u5b9e\u9645\u6570\u636e\uff0c\u5fc5\u987b\u501f\u52a9\u4ece\u5176\u4ed6\u8868\u4e2d\u83b7\u5f97\u7684\u4fe1\u606f\uff0c\u5176\u4e2d\u5927\u90e8\u5206\u6765\u81ea <code class=\"structname\">pg_attribute</code>\u3002\u8bc6\u522b\u5b57\u6bb5\u4f4d\u7f6e\u6240\u9700\u7684\u5173\u952e\u503c\u662f <code class=\"structfield\">attlen</code> \u548c <code class=\"structfield\">attalign</code>\u3002\u9664\u975e\u6240\u6709\u5b57\u6bb5\u90fd\u662f\u5b9a\u5bbd\u4e14\u6ca1\u6709\u7a7a\u503c\uff0c\u5426\u5219\u6ca1\u6709\u529e\u6cd5\u76f4\u63a5\u53d6\u5f97\u67d0\u4e2a\u7279\u5b9a\u5c5e\u6027\u3002\u6240\u6709\u8fd9\u4e9b\u6280\u5de7\u90fd\u5c01\u88c5\u5728 <em class=\"firstterm\">heap_getattr</em>\u3001<em class=\"firstterm\">fastgetattr</em> \u548c <em class=\"firstterm\">heap_getsysattr</em> \u8fd9\u4e9b\u51fd\u6570\u4e2d\u3002</p>\n<p lang=\"zh\">\u8bfb\u53d6\u6570\u636e\u65f6\uff0c\u9700\u8981\u4f9d\u6b21\u68c0\u67e5\u6bcf\u4e2a\u5c5e\u6027\u3002\u9996\u5148\u6839\u636e\u7a7a\u503c\u4f4d\u56fe\u5224\u65ad\u8be5\u5b57\u6bb5\u662f\u5426\u4e3a NULL\u3002\u5982\u679c\u662f\uff0c\u5c31\u7ee7\u7eed\u4e0b\u4e00\u4e2a\u3002\u7136\u540e\u786e\u8ba4\u5bf9\u9f50\u662f\u5426\u6b63\u786e\u3002\u5982\u679c\u5b57\u6bb5\u662f\u5b9a\u5bbd\u5b57\u6bb5\uff0c\u90a3\u4e48\u5b83\u7684\u6240\u6709\u5b57\u8282\u90fd\u662f\u76f4\u63a5\u6446\u653e\u7684\uff1b\u5982\u679c\u5b83\u662f\u53d8\u957f\u5b57\u6bb5\uff08attlen = -1\uff09\uff0c\u60c5\u51b5\u5c31\u4f1a\u7a0d\u590d\u6742\u4e00\u4e9b\u3002\u6240\u6709\u53d8\u957f\u6570\u636e\u7c7b\u578b\u90fd\u5171\u4eab\u4e00\u4e2a\u901a\u7528\u5934\u90e8\u7ed3\u6784\u4f53 <code class=\"type\">struct varlena</code>\uff0c\u5176\u4e2d\u5305\u542b\u5df2\u5b58\u50a8\u503c\u7684\u603b\u957f\u5ea6\u4ee5\u53ca\u4e00\u4e9b\u6807\u5fd7\u4f4d\u3002\u6839\u636e\u8fd9\u4e9b\u6807\u5fd7\uff0c\u6570\u636e\u53ef\u80fd\u662f\u884c\u5185\u5b58\u50a8\u7684\uff0c\u4e5f\u53ef\u80fd\u4f4d\u4e8e <acronym class=\"acronym\">TOAST</acronym> \u8868\u4e2d\uff1b\u5b83\u4e5f\u53ef\u80fd\u662f\u7ecf\u8fc7\u538b\u7f29\u7684\uff08\u89c1<a class=\"xref\" href=\"/docs/17/storage-toast.html\" title=\"65.2.\u00a0TOAST\">\u7b2c\u00a065.2\u00a0\u8282</a>\uff09\u3002</p>\n</div>", "manual_path": "/docs/17/storage-page-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/17/storage-page-layout.html", "method": "same-major semantic node", "sha256": "5f1706fce27c6505086f0b42549876c32ebaba985b000585c62535c69b933c3f", "language": "zh", "matched_nodes": ["#STORAGE-PAGE-LAYOUT/div[18]/div[2]/p[0]", "#STORAGE-PAGE-LAYOUT/div[18]/p[1]", "#STORAGE-PAGE-LAYOUT/div[18]/p[4]", "#STORAGE-PAGE-LAYOUT/div[18]/p[5]", "#STORAGE-PAGE-LAYOUT/div[18]/p[6]", "#STORAGE-PAGE-LAYOUT/div[1]"]}], "language": "zh", "original_text": {"/versions/17/description/0": "Physical row headers, null bitmap, alignment and column data.", "/versions/17/tables/0/title": "HeapTupleHeaderData Layout", "/versions/17/tables/0/rows/0/c2": "4 bytes", "/versions/17/tables/0/rows/0/c3": "insert XID stamp", "/versions/17/tables/0/rows/1/c2": "4 bytes", "/versions/17/tables/0/rows/1/c3": "delete XID stamp", "/versions/17/tables/0/rows/2/c2": "4 bytes", "/versions/17/tables/0/rows/2/c3": "insert and/or delete CID stamp (overlays with t_xvac)", "/versions/17/tables/0/rows/3/c2": "4 bytes", "/versions/17/tables/0/rows/3/c3": "XID for VACUUM operation moving a row version", "/versions/17/tables/0/rows/4/c2": "6 bytes", "/versions/17/tables/0/rows/4/c3": "current TID of this or newer row version", "/versions/17/tables/0/rows/5/c2": "2 bytes", "/versions/17/tables/0/rows/5/c3": "number of attributes, plus various flag bits", "/versions/17/tables/0/rows/6/c2": "2 bytes", "/versions/17/tables/0/rows/6/c3": "various flag bits", "/versions/17/tables/0/rows/7/c2": "1 byte", "/versions/17/tables/0/rows/7/c3": "offset to user data", "/versions/17/tables/0/columns/0/label": "Field", "/versions/17/tables/0/columns/1/label": "Type", "/versions/17/tables/0/columns/2/label": "Length", "/versions/17/tables/0/columns/3/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "de979b68aa0498108b1b653e3aa3c338110c1604fc040114a3988741b69dcac2"}, "comparison_data": {"layouts": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 bytes", "c3": "insert XID stamp"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 bytes", "c3": "delete XID stamp"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 bytes", "c3": "insert and/or delete CID stamp (overlays with t_xvac)"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 bytes", "c3": "XID for VACUUM operation moving a row version"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 bytes", "c3": "current TID of this or newer row version"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 bytes", "c3": "number of attributes, plus various flag bits"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 bytes", "c3": "various flag bits"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 byte", "c3": "offset to user data"}], "title": "HeapTupleHeaderData Layout", "columns": [{"key": "c0", "label": "Field"}, {"key": "c1", "label": "Type"}, {"key": "c2", "label": "Length"}, {"key": "c3", "label": "Description"}]}]}, "comparison_hash": "7f6e968716966dae8869d6c14f0a6aa229d745d4d4bde899b61eeec58c8d7ea0", "manual_language": "zh"}, "18": {"facts": [], "tables": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u4e8b\u52a1\u7684 XID"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u5220\u9664\u4e8b\u52a1\u7684 XID"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 \u5b57\u8282", "c3": "\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 \u5b57\u8282", "c3": "\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf"}], "title": "HeapTupleHeaderData \u5e03\u5c40", "columns": [{"key": "c0", "label": "\u5b57\u6bb5"}, {"key": "c1", "label": "\u7c7b\u578b"}, {"key": "c2", "label": "\u957f\u5ea6"}, {"key": "c3", "label": "\u8bf4\u660e"}]}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "https://pg.center/docs/18/storage-page-layout.html#STORAGE-TUPLE-LAYOUT", "path": "storage-page-layout.html", "label": "PostgreSQL 18 English manual", "sha256": "0d9f99e4cef5ea0a6741a74cab87052b929f7001730853c85d5e60d72179d355", "language": "en", "original_url": "/docs/18/storage-page-layout.html#STORAGE-TUPLE-LAYOUT"}], "sections": [], "signature": "", "description": ["\u7269\u7406\u884c\u9996\u90e8\u3001\u7a7a\u503c\u4f4d\u56fe\u3001\u5bf9\u9f50\u4e0e\u5217\u6570\u636e\u3002"], "manual_html": "<div class=\"sect2\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\">\n<dl class=\"toc\">\n<dt><span class=\"sect2\"><a href=\"/docs/18/storage-page-layout.html#STORAGE-TUPLE-LAYOUT\">66.6.1. \u8868\u884c\u5e03\u5c40</a></span></dt>\n</dl>\n</h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u6240\u6709\u8868\u884c\u7684\u7ed3\u6784\u90fd\u76f8\u540c\u3002\u5b83\u4eec\u90fd\u6709\u4e00\u4e2a\u56fa\u5b9a\u5927\u5c0f\u7684\u5934\u90e8\uff08\u5728\u5927\u591a\u6570\u673a\u5668\u4e0a\u5360 23 \u5b57\u8282\uff09\uff0c\u540e\u9762\u8ddf\u7740\u53ef\u9009\u7684\u7a7a\u503c\u4f4d\u56fe\u3001\u53ef\u9009\u7684\u5bf9\u8c61 ID \u5b57\u6bb5\u4ee5\u53ca\u7528\u6237\u6570\u636e\u3002\u5934\u90e8\u7684\u8be6\u7ec6\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/18/storage-page-layout.html#HEAPTUPLEHEADERDATA-TABLE\" title=\"\u8868\u00a066.4.\u00a0HeapTupleHeaderData \u5e03\u5c40\">\u8868\u00a066.4</a>\u3002\u5b9e\u9645\u7528\u6237\u6570\u636e\uff08\u884c\u7684\u5404\u5217\uff09\u4ece <code class=\"structfield\">t_hoff</code> \u6307\u793a\u7684\u504f\u79fb\u4f4d\u7f6e\u5f00\u59cb\uff0c\u5b83\u5fc5\u987b\u59cb\u7ec8\u662f\u8be5\u5e73\u53f0 MAXALIGN \u5bf9\u9f50\u5355\u4f4d\u7684\u6574\u6570\u500d\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASNULL</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u7a7a\u503c\u4f4d\u56fe\u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u7d27\u968f\u56fa\u5b9a\u5934\u90e8\u4e4b\u540e\uff0c\u5e76\u5360\u7528\u8db3\u591f\u591a\u7684\u5b57\u8282\uff0c\u4ee5\u4fbf\u4e3a\u6bcf\u4e2a\u6570\u636e\u5217\u63d0\u4f9b\u4e00\u4f4d\uff08\u4e5f\u5c31\u662f\u8bf4\uff0c\u5176\u4f4d\u6570\u7b49\u4e8e <code class=\"structfield\">t_infomask2</code> \u4e2d\u7684\u5c5e\u6027\u4e2a\u6570\uff09\u3002\u5728\u8fd9\u4e2a\u4f4d\u56fe\u4e2d\uff0c1 \u8868\u793a\u975e\u7a7a\uff0c0 \u8868\u793a\u7a7a\u503c\u3002\u5f53\u4f4d\u56fe\u4e0d\u5b58\u5728\u65f6\uff0c\u5047\u5b9a\u6240\u6709\u5217\u90fd\u975e\u7a7a\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASOID_OLD</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u5bf9\u8c61 ID \u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u4f4d\u4e8e <code class=\"structfield\">t_hoff</code> \u8fb9\u754c\u4e4b\u524d\u3002\u4e3a\u4e86\u8ba9 <code class=\"structfield\">t_hoff</code> \u6210\u4e3a MAXALIGN \u7684\u6574\u6570\u500d\u6240\u9700\u7684\u4efb\u4f55\u586b\u5145\uff0c\u90fd\u4f1a\u51fa\u73b0\u5728\u7a7a\u503c\u4f4d\u56fe\u4e0e\u5bf9\u8c61 ID \u4e4b\u95f4\u3002\uff08\u8fd9\u53c8\u53cd\u8fc7\u6765\u4fdd\u8bc1\u4e86\u5bf9\u8c61 ID \u7684\u5bf9\u9f50\u662f\u5408\u9002\u7684\u3002\uff09</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a066.4.\u00a0HeapTupleHeaderData \u5e03\u5c40</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u5b57\u6bb5</th>\n<th lang=\"zh\">\u7c7b\u578b</th>\n<th lang=\"zh\">\u957f\u5ea6</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>t_xmin</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_xmax</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u5220\u9664\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_cid</td>\n<td>CommandId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e</td>\n</tr>\n<tr>\n<td>t_xvac</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID</td>\n</tr>\n<tr>\n<td>t_ctid</td>\n<td>ItemPointerData</td>\n<td lang=\"zh\">6 \u5b57\u8282</td>\n<td lang=\"zh\">\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID</td>\n</tr>\n<tr>\n<td>t_infomask2</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_infomask</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_hoff</td>\n<td>uint8</td>\n<td lang=\"zh\">1 \u5b57\u8282</td>\n<td lang=\"zh\">\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u6240\u6709\u7ec6\u8282\u90fd\u53ef\u4ee5\u5728 <code class=\"filename\">src/include/access/htup_details.h</code> \u4e2d\u627e\u5230\u3002</p>\n<p lang=\"zh\">\u8981\u89e3\u91ca\u5b9e\u9645\u6570\u636e\uff0c\u5fc5\u987b\u501f\u52a9\u4ece\u5176\u4ed6\u8868\u4e2d\u83b7\u5f97\u7684\u4fe1\u606f\uff0c\u5176\u4e2d\u5927\u90e8\u5206\u6765\u81ea <code class=\"structname\">pg_attribute</code>\u3002\u8bc6\u522b\u5b57\u6bb5\u4f4d\u7f6e\u6240\u9700\u7684\u5173\u952e\u503c\u662f <code class=\"structfield\">attlen</code> \u548c <code class=\"structfield\">attalign</code>\u3002\u9664\u975e\u6240\u6709\u5b57\u6bb5\u90fd\u662f\u5b9a\u5bbd\u4e14\u6ca1\u6709\u7a7a\u503c\uff0c\u5426\u5219\u6ca1\u6709\u529e\u6cd5\u76f4\u63a5\u53d6\u5f97\u67d0\u4e2a\u7279\u5b9a\u5c5e\u6027\u3002\u6240\u6709\u8fd9\u4e9b\u6280\u5de7\u90fd\u5c01\u88c5\u5728 <em class=\"firstterm\">heap_getattr</em>\u3001<em class=\"firstterm\">fastgetattr</em> \u548c <em class=\"firstterm\">heap_getsysattr</em> \u8fd9\u4e9b\u51fd\u6570\u4e2d\u3002</p>\n<p lang=\"zh\">\u8bfb\u53d6\u6570\u636e\u65f6\uff0c\u9700\u8981\u4f9d\u6b21\u68c0\u67e5\u6bcf\u4e2a\u5c5e\u6027\u3002\u9996\u5148\u6839\u636e\u7a7a\u503c\u4f4d\u56fe\u5224\u65ad\u8be5\u5b57\u6bb5\u662f\u5426\u4e3a NULL\u3002\u5982\u679c\u662f\uff0c\u5c31\u7ee7\u7eed\u4e0b\u4e00\u4e2a\u3002\u7136\u540e\u786e\u8ba4\u5bf9\u9f50\u662f\u5426\u6b63\u786e\u3002\u5982\u679c\u5b57\u6bb5\u662f\u5b9a\u5bbd\u5b57\u6bb5\uff0c\u90a3\u4e48\u5b83\u7684\u6240\u6709\u5b57\u8282\u90fd\u662f\u76f4\u63a5\u6446\u653e\u7684\uff1b\u5982\u679c\u5b83\u662f\u53d8\u957f\u5b57\u6bb5\uff08attlen = -1\uff09\uff0c\u60c5\u51b5\u5c31\u4f1a\u7a0d\u590d\u6742\u4e00\u4e9b\u3002\u6240\u6709\u53d8\u957f\u6570\u636e\u7c7b\u578b\u90fd\u5171\u4eab\u4e00\u4e2a\u901a\u7528\u5934\u90e8\u7ed3\u6784\u4f53 <code class=\"type\">struct varlena</code>\uff0c\u5176\u4e2d\u5305\u542b\u5df2\u5b58\u50a8\u503c\u7684\u603b\u957f\u5ea6\u4ee5\u53ca\u4e00\u4e9b\u6807\u5fd7\u4f4d\u3002\u6839\u636e\u8fd9\u4e9b\u6807\u5fd7\uff0c\u6570\u636e\u53ef\u80fd\u662f\u884c\u5185\u5b58\u50a8\u7684\uff0c\u4e5f\u53ef\u80fd\u4f4d\u4e8e <acronym class=\"acronym\">TOAST</acronym> \u8868\u4e2d\uff1b\u5b83\u4e5f\u53ef\u80fd\u662f\u7ecf\u8fc7\u538b\u7f29\u7684\uff08\u89c1<a class=\"xref\" href=\"/docs/18/storage-toast.html\" title=\"66.2.\u00a0TOAST\">\u7b2c\u00a066.2\u00a0\u8282</a>\uff09\u3002</p>\n</div>", "manual_path": "/docs/18/storage-page-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/18/storage-page-layout.html", "method": "same-major semantic node", "sha256": "e504ff90f2cabf6f71046d80f1cc8d49664ba2f2f4bce0ef26e955d6c5580ab2", "language": "zh", "matched_nodes": ["#STORAGE-PAGE-LAYOUT/div[18]/div[2]/p[0]", "#STORAGE-PAGE-LAYOUT/div[18]/p[1]", "#STORAGE-PAGE-LAYOUT/div[18]/p[4]", "#STORAGE-PAGE-LAYOUT/div[18]/p[5]", "#STORAGE-PAGE-LAYOUT/div[18]/p[6]", "#STORAGE-PAGE-LAYOUT/div[1]"]}], "language": "zh", "original_text": {"/versions/18/description/0": "Physical row headers, null bitmap, alignment and column data.", "/versions/18/tables/0/title": "HeapTupleHeaderData Layout", "/versions/18/tables/0/rows/0/c2": "4 bytes", "/versions/18/tables/0/rows/0/c3": "insert XID stamp", "/versions/18/tables/0/rows/1/c2": "4 bytes", "/versions/18/tables/0/rows/1/c3": "delete XID stamp", "/versions/18/tables/0/rows/2/c2": "4 bytes", "/versions/18/tables/0/rows/2/c3": "insert and/or delete CID stamp (overlays with t_xvac)", "/versions/18/tables/0/rows/3/c2": "4 bytes", "/versions/18/tables/0/rows/3/c3": "XID for VACUUM operation moving a row version", "/versions/18/tables/0/rows/4/c2": "6 bytes", "/versions/18/tables/0/rows/4/c3": "current TID of this or newer row version", "/versions/18/tables/0/rows/5/c2": "2 bytes", "/versions/18/tables/0/rows/5/c3": "number of attributes, plus various flag bits", "/versions/18/tables/0/rows/6/c2": "2 bytes", "/versions/18/tables/0/rows/6/c3": "various flag bits", "/versions/18/tables/0/rows/7/c2": "1 byte", "/versions/18/tables/0/rows/7/c3": "offset to user data", "/versions/18/tables/0/columns/0/label": "Field", "/versions/18/tables/0/columns/1/label": "Type", "/versions/18/tables/0/columns/2/label": "Length", "/versions/18/tables/0/columns/3/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "f0a44bd96ec79f5387e9c512ba7a6444f819cd1a32e4c0cdf82f78d6c9d7d5b2"}, "comparison_data": {"layouts": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 bytes", "c3": "insert XID stamp"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 bytes", "c3": "delete XID stamp"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 bytes", "c3": "insert and/or delete CID stamp (overlays with t_xvac)"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 bytes", "c3": "XID for VACUUM operation moving a row version"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 bytes", "c3": "current TID of this or newer row version"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 bytes", "c3": "number of attributes, plus various flag bits"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 bytes", "c3": "various flag bits"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 byte", "c3": "offset to user data"}], "title": "HeapTupleHeaderData Layout", "columns": [{"key": "c0", "label": "Field"}, {"key": "c1", "label": "Type"}, {"key": "c2", "label": "Length"}, {"key": "c3", "label": "Description"}]}]}, "comparison_hash": "7f6e968716966dae8869d6c14f0a6aa229d745d4d4bde899b61eeec58c8d7ea0", "manual_language": "zh"}, "19": {"facts": [], "tables": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u4e8b\u52a1\u7684 XID"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u5220\u9664\u4e8b\u52a1\u7684 XID"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 \u5b57\u8282", "c3": "\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 \u5b57\u8282", "c3": "\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf"}], "title": "HeapTupleHeaderData \u5e03\u5c40", "columns": [{"key": "c0", "label": "\u5b57\u6bb5"}, {"key": "c1", "label": "\u7c7b\u578b"}, {"key": "c2", "label": "\u957f\u5ea6"}, {"key": "c3", "label": "\u8bf4\u660e"}]}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "label": "19beta4", "major": "19", "channel": "preview", "revision": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}, "sources": [{"url": "https://pg.center/docs/19/storage-page-layout.html#STORAGE-TUPLE-LAYOUT", "path": "storage-page-layout.html", "label": "PostgreSQL 19 English manual", "sha256": "4ef53402590510fe17440d51323824cca73b5cd6a17df88b2ef076c204de2126", "language": "en", "original_url": "/docs/19/storage-page-layout.html#STORAGE-TUPLE-LAYOUT"}], "sections": [], "signature": "", "description": ["\u7269\u7406\u884c\u9996\u90e8\u3001\u7a7a\u503c\u4f4d\u56fe\u3001\u5bf9\u9f50\u4e0e\u5217\u6570\u636e\u3002"], "manual_html": "<div class=\"sect2\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\">\n<dl class=\"toc\">\n<dt><span class=\"sect2\"><a href=\"/docs/19/storage-page-layout.html#STORAGE-TUPLE-LAYOUT\">66.6.1. \u8868\u884c\u5e03\u5c40</a></span></dt>\n</dl>\n</h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u6240\u6709\u8868\u884c\u7684\u7ed3\u6784\u90fd\u76f8\u540c\u3002\u5b83\u4eec\u90fd\u6709\u4e00\u4e2a\u56fa\u5b9a\u5927\u5c0f\u7684\u5934\u90e8\uff08\u5728\u5927\u591a\u6570\u673a\u5668\u4e0a\u5360 23 \u5b57\u8282\uff09\uff0c\u540e\u9762\u8ddf\u7740\u53ef\u9009\u7684\u7a7a\u503c\u4f4d\u56fe\u3001\u53ef\u9009\u7684\u5bf9\u8c61 ID \u5b57\u6bb5\u4ee5\u53ca\u7528\u6237\u6570\u636e\u3002\u5934\u90e8\u7684\u8be6\u7ec6\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/19/storage-page-layout.html#HEAPTUPLEHEADERDATA-TABLE\" title=\"\u8868\u00a066.4.\u00a0HeapTupleHeaderData \u5e03\u5c40\">\u8868\u00a066.4</a>\u3002\u5b9e\u9645\u7528\u6237\u6570\u636e\uff08\u884c\u7684\u5404\u5217\uff09\u4ece <code class=\"structfield\">t_hoff</code> \u6307\u793a\u7684\u504f\u79fb\u4f4d\u7f6e\u5f00\u59cb\uff0c\u5b83\u5fc5\u987b\u59cb\u7ec8\u662f\u8be5\u5e73\u53f0 MAXALIGN \u5bf9\u9f50\u5355\u4f4d\u7684\u6574\u6570\u500d\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASNULL</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u7a7a\u503c\u4f4d\u56fe\u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u7d27\u968f\u56fa\u5b9a\u5934\u90e8\u4e4b\u540e\uff0c\u5e76\u5360\u7528\u8db3\u591f\u591a\u7684\u5b57\u8282\uff0c\u4ee5\u4fbf\u4e3a\u6bcf\u4e2a\u6570\u636e\u5217\u63d0\u4f9b\u4e00\u4f4d\uff08\u4e5f\u5c31\u662f\u8bf4\uff0c\u5176\u4f4d\u6570\u7b49\u4e8e <code class=\"structfield\">t_infomask2</code> \u4e2d\u7684\u5c5e\u6027\u4e2a\u6570\uff09\u3002\u5728\u8fd9\u4e2a\u4f4d\u56fe\u4e2d\uff0c1 \u8868\u793a\u975e\u7a7a\uff0c0 \u8868\u793a\u7a7a\u503c\u3002\u5f53\u4f4d\u56fe\u4e0d\u5b58\u5728\u65f6\uff0c\u5047\u5b9a\u6240\u6709\u5217\u90fd\u975e\u7a7a\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASOID_OLD</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u5bf9\u8c61 ID \u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u4f4d\u4e8e <code class=\"structfield\">t_hoff</code> \u8fb9\u754c\u4e4b\u524d\u3002\u4e3a\u4e86\u8ba9 <code class=\"structfield\">t_hoff</code> \u6210\u4e3a MAXALIGN \u7684\u6574\u6570\u500d\u6240\u9700\u7684\u4efb\u4f55\u586b\u5145\uff0c\u90fd\u4f1a\u51fa\u73b0\u5728\u7a7a\u503c\u4f4d\u56fe\u4e0e\u5bf9\u8c61 ID \u4e4b\u95f4\u3002\uff08\u8fd9\u53c8\u53cd\u8fc7\u6765\u4fdd\u8bc1\u4e86\u5bf9\u8c61 ID \u7684\u5bf9\u9f50\u662f\u5408\u9002\u7684\u3002\uff09</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a066.4.\u00a0HeapTupleHeaderData \u5e03\u5c40</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u5b57\u6bb5</th>\n<th lang=\"zh\">\u7c7b\u578b</th>\n<th lang=\"zh\">\u957f\u5ea6</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>t_xmin</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_xmax</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u5220\u9664\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_cid</td>\n<td>CommandId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e</td>\n</tr>\n<tr>\n<td>t_xvac</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID</td>\n</tr>\n<tr>\n<td>t_ctid</td>\n<td>ItemPointerData</td>\n<td lang=\"zh\">6 \u5b57\u8282</td>\n<td lang=\"zh\">\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID</td>\n</tr>\n<tr>\n<td>t_infomask2</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_infomask</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_hoff</td>\n<td>uint8</td>\n<td lang=\"zh\">1 \u5b57\u8282</td>\n<td lang=\"zh\">\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u6240\u6709\u7ec6\u8282\u90fd\u53ef\u4ee5\u5728 <code class=\"filename\">src/include/access/htup_details.h</code> \u4e2d\u627e\u5230\u3002</p>\n<p lang=\"zh\">\u8981\u89e3\u91ca\u5b9e\u9645\u6570\u636e\uff0c\u5fc5\u987b\u501f\u52a9\u4ece\u5176\u4ed6\u8868\u4e2d\u83b7\u5f97\u7684\u4fe1\u606f\uff0c\u5176\u4e2d\u5927\u90e8\u5206\u6765\u81ea <code class=\"structname\">pg_attribute</code>\u3002\u8bc6\u522b\u5b57\u6bb5\u4f4d\u7f6e\u6240\u9700\u7684\u5173\u952e\u503c\u662f <code class=\"structfield\">attlen</code> \u548c <code class=\"structfield\">attalign</code>\u3002\u9664\u975e\u6240\u6709\u5b57\u6bb5\u90fd\u662f\u5b9a\u5bbd\u4e14\u6ca1\u6709\u7a7a\u503c\uff0c\u5426\u5219\u6ca1\u6709\u529e\u6cd5\u76f4\u63a5\u53d6\u5f97\u67d0\u4e2a\u7279\u5b9a\u5c5e\u6027\u3002\u6240\u6709\u8fd9\u4e9b\u6280\u5de7\u90fd\u5c01\u88c5\u5728 <em class=\"firstterm\">heap_getattr</em>\u3001<em class=\"firstterm\">fastgetattr</em> \u548c <em class=\"firstterm\">heap_getsysattr</em> \u8fd9\u4e9b\u51fd\u6570\u4e2d\u3002</p>\n<p lang=\"zh\">\u8bfb\u53d6\u6570\u636e\u65f6\uff0c\u9700\u8981\u4f9d\u6b21\u68c0\u67e5\u6bcf\u4e2a\u5c5e\u6027\u3002\u9996\u5148\u6839\u636e\u7a7a\u503c\u4f4d\u56fe\u5224\u65ad\u8be5\u5b57\u6bb5\u662f\u5426\u4e3a NULL\u3002\u5982\u679c\u662f\uff0c\u5c31\u7ee7\u7eed\u4e0b\u4e00\u4e2a\u3002\u7136\u540e\u786e\u8ba4\u5bf9\u9f50\u662f\u5426\u6b63\u786e\u3002\u5982\u679c\u5b57\u6bb5\u662f\u5b9a\u5bbd\u5b57\u6bb5\uff0c\u90a3\u4e48\u5b83\u7684\u6240\u6709\u5b57\u8282\u90fd\u662f\u76f4\u63a5\u6446\u653e\u7684\uff1b\u5982\u679c\u5b83\u662f\u53d8\u957f\u5b57\u6bb5\uff08attlen = -1\uff09\uff0c\u60c5\u51b5\u5c31\u4f1a\u7a0d\u590d\u6742\u4e00\u4e9b\u3002\u6240\u6709\u53d8\u957f\u6570\u636e\u7c7b\u578b\u90fd\u5171\u4eab\u4e00\u4e2a\u901a\u7528\u5934\u90e8\u7ed3\u6784\u4f53 <code class=\"type\">varlena</code>\uff0c\u5176\u4e2d\u5305\u542b\u5df2\u5b58\u50a8\u503c\u7684\u603b\u957f\u5ea6\u4ee5\u53ca\u4e00\u4e9b\u6807\u5fd7\u4f4d\u3002\u6839\u636e\u8fd9\u4e9b\u6807\u5fd7\uff0c\u6570\u636e\u53ef\u80fd\u662f\u884c\u5185\u5b58\u50a8\u7684\uff0c\u4e5f\u53ef\u80fd\u4f4d\u4e8e <acronym class=\"acronym\">TOAST</acronym> \u8868\u4e2d\uff1b\u5b83\u4e5f\u53ef\u80fd\u662f\u7ecf\u8fc7\u538b\u7f29\u7684\uff08\u89c1<a class=\"xref\" href=\"/docs/19/storage-toast.html\" title=\"66.2.\u00a0TOAST\">\u7b2c\u00a066.2\u00a0\u8282</a>\uff09\u3002</p>\n</div>", "manual_path": "/docs/19/storage-page-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/19/storage-page-layout.html", "method": "same-major semantic node", "sha256": "449d5df50770072a5159075c211dd18f895edeaeb7ea22ba5936d469b017017c", "language": "zh", "matched_nodes": ["#STORAGE-PAGE-LAYOUT/div[18]/div[2]/p[0]", "#STORAGE-PAGE-LAYOUT/div[18]/p[1]", "#STORAGE-PAGE-LAYOUT/div[18]/p[4]", "#STORAGE-PAGE-LAYOUT/div[18]/p[5]", "#STORAGE-PAGE-LAYOUT/div[18]/p[6]", "#STORAGE-PAGE-LAYOUT/div[1]"]}], "language": "zh", "original_text": {"/versions/19/description/0": "Physical row headers, null bitmap, alignment and column data.", "/versions/19/tables/0/title": "HeapTupleHeaderData Layout", "/versions/19/tables/0/rows/0/c2": "4 bytes", "/versions/19/tables/0/rows/0/c3": "insert XID stamp", "/versions/19/tables/0/rows/1/c2": "4 bytes", "/versions/19/tables/0/rows/1/c3": "delete XID stamp", "/versions/19/tables/0/rows/2/c2": "4 bytes", "/versions/19/tables/0/rows/2/c3": "insert and/or delete CID stamp (overlays with t_xvac)", "/versions/19/tables/0/rows/3/c2": "4 bytes", "/versions/19/tables/0/rows/3/c3": "XID for VACUUM operation moving a row version", "/versions/19/tables/0/rows/4/c2": "6 bytes", "/versions/19/tables/0/rows/4/c3": "current TID of this or newer row version", "/versions/19/tables/0/rows/5/c2": "2 bytes", "/versions/19/tables/0/rows/5/c3": "number of attributes, plus various flag bits", "/versions/19/tables/0/rows/6/c2": "2 bytes", "/versions/19/tables/0/rows/6/c3": "various flag bits", "/versions/19/tables/0/rows/7/c2": "1 byte", "/versions/19/tables/0/rows/7/c3": "offset to user data", "/versions/19/tables/0/columns/0/label": "Field", "/versions/19/tables/0/columns/1/label": "Type", "/versions/19/tables/0/columns/2/label": "Length", "/versions/19/tables/0/columns/3/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "7ab94bd5f8a7ff7760f32152448a2c90b8db557e4eb97df768f597e53e7c5551"}, "comparison_data": {"layouts": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 bytes", "c3": "insert XID stamp"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 bytes", "c3": "delete XID stamp"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 bytes", "c3": "insert and/or delete CID stamp (overlays with t_xvac)"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 bytes", "c3": "XID for VACUUM operation moving a row version"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 bytes", "c3": "current TID of this or newer row version"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 bytes", "c3": "number of attributes, plus various flag bits"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 bytes", "c3": "various flag bits"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 byte", "c3": "offset to user data"}], "title": "HeapTupleHeaderData Layout", "columns": [{"key": "c0", "label": "Field"}, {"key": "c1", "label": "Type"}, {"key": "c2", "label": "Length"}, {"key": "c3", "label": "Description"}]}]}, "comparison_hash": "7f6e968716966dae8869d6c14f0a6aa229d745d4d4bde899b61eeec58c8d7ea0", "manual_language": "zh"}, "20": {"facts": [], "tables": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u4e8b\u52a1\u7684 XID"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u5220\u9664\u4e8b\u52a1\u7684 XID"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 \u5b57\u8282", "c3": "\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 \u5b57\u8282", "c3": "\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf"}], "title": "HeapTupleHeaderData \u5e03\u5c40", "columns": [{"key": "c0", "label": "\u5b57\u6bb5"}, {"key": "c1", "label": "\u7c7b\u578b"}, {"key": "c2", "label": "\u957f\u5ea6"}, {"key": "c3", "label": "\u8bf4\u660e"}]}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "label": "20devel", "major": "20", "channel": "devel", "revision": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41"}, "sources": [{"url": "https://pg.center/docs/devel/storage-page-layout.html#STORAGE-TUPLE-LAYOUT", "path": "storage-page-layout.html", "label": "PostgreSQL 20 English manual", "sha256": "4e487a076f789ae63b2d33f89a8b13837d6589937dd3f00bf0a30e9eb9e2ec13", "language": "en", "original_url": "/docs/devel/storage-page-layout.html#STORAGE-TUPLE-LAYOUT"}], "sections": [], "signature": "", "description": ["\u7269\u7406\u884c\u9996\u90e8\u3001\u7a7a\u503c\u4f4d\u56fe\u3001\u5bf9\u9f50\u4e0e\u5217\u6570\u636e\u3002"], "manual_html": "<div class=\"sect2\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\">\n<dl class=\"toc\">\n<dt><span class=\"sect2\"><a href=\"/docs/devel/storage-page-layout.html#STORAGE-TUPLE-LAYOUT\">66.6.1. \u8868\u884c\u5e03\u5c40</a></span></dt>\n</dl>\n</h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u6240\u6709\u8868\u884c\u7684\u7ed3\u6784\u90fd\u76f8\u540c\u3002\u5b83\u4eec\u90fd\u6709\u4e00\u4e2a\u56fa\u5b9a\u5927\u5c0f\u7684\u5934\u90e8\uff08\u5728\u5927\u591a\u6570\u673a\u5668\u4e0a\u5360 23 \u5b57\u8282\uff09\uff0c\u540e\u9762\u8ddf\u7740\u53ef\u9009\u7684\u7a7a\u503c\u4f4d\u56fe\u3001\u53ef\u9009\u7684\u5bf9\u8c61 ID \u5b57\u6bb5\u4ee5\u53ca\u7528\u6237\u6570\u636e\u3002\u5934\u90e8\u7684\u8be6\u7ec6\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/devel/storage-page-layout.html#HEAPTUPLEHEADERDATA-TABLE\" title=\"\u8868\u00a066.4.\u00a0HeapTupleHeaderData \u5e03\u5c40\">\u8868\u00a066.4</a>\u3002\u5b9e\u9645\u7528\u6237\u6570\u636e\uff08\u884c\u7684\u5404\u5217\uff09\u4ece <code class=\"structfield\">t_hoff</code> \u6307\u793a\u7684\u504f\u79fb\u4f4d\u7f6e\u5f00\u59cb\uff0c\u5b83\u5fc5\u987b\u59cb\u7ec8\u662f\u8be5\u5e73\u53f0 MAXALIGN \u5bf9\u9f50\u5355\u4f4d\u7684\u6574\u6570\u500d\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASNULL</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u7a7a\u503c\u4f4d\u56fe\u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u7d27\u968f\u56fa\u5b9a\u5934\u90e8\u4e4b\u540e\uff0c\u5e76\u5360\u7528\u8db3\u591f\u591a\u7684\u5b57\u8282\uff0c\u4ee5\u4fbf\u4e3a\u6bcf\u4e2a\u6570\u636e\u5217\u63d0\u4f9b\u4e00\u4f4d\uff08\u4e5f\u5c31\u662f\u8bf4\uff0c\u5176\u4f4d\u6570\u7b49\u4e8e <code class=\"structfield\">t_infomask2</code> \u4e2d\u7684\u5c5e\u6027\u4e2a\u6570\uff09\u3002\u5728\u8fd9\u4e2a\u4f4d\u56fe\u4e2d\uff0c1 \u8868\u793a\u975e\u7a7a\uff0c0 \u8868\u793a\u7a7a\u503c\u3002\u5f53\u4f4d\u56fe\u4e0d\u5b58\u5728\u65f6\uff0c\u5047\u5b9a\u6240\u6709\u5217\u90fd\u975e\u7a7a\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASOID_OLD</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u5bf9\u8c61 ID \u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u4f4d\u4e8e <code class=\"structfield\">t_hoff</code> \u8fb9\u754c\u4e4b\u524d\u3002\u4e3a\u4e86\u8ba9 <code class=\"structfield\">t_hoff</code> \u6210\u4e3a MAXALIGN \u7684\u6574\u6570\u500d\u6240\u9700\u7684\u4efb\u4f55\u586b\u5145\uff0c\u90fd\u4f1a\u51fa\u73b0\u5728\u7a7a\u503c\u4f4d\u56fe\u4e0e\u5bf9\u8c61 ID \u4e4b\u95f4\u3002\uff08\u8fd9\u53c8\u53cd\u8fc7\u6765\u4fdd\u8bc1\u4e86\u5bf9\u8c61 ID \u7684\u5bf9\u9f50\u662f\u5408\u9002\u7684\u3002\uff09</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a066.4.\u00a0HeapTupleHeaderData \u5e03\u5c40</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u5b57\u6bb5</th>\n<th lang=\"zh\">\u7c7b\u578b</th>\n<th lang=\"zh\">\u957f\u5ea6</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>t_xmin</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_xmax</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u5220\u9664\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_cid</td>\n<td>CommandId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e</td>\n</tr>\n<tr>\n<td>t_xvac</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID</td>\n</tr>\n<tr>\n<td>t_ctid</td>\n<td>ItemPointerData</td>\n<td lang=\"zh\">6 \u5b57\u8282</td>\n<td lang=\"zh\">\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID</td>\n</tr>\n<tr>\n<td>t_infomask2</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_infomask</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_hoff</td>\n<td>uint8</td>\n<td lang=\"zh\">1 \u5b57\u8282</td>\n<td lang=\"zh\">\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u6240\u6709\u7ec6\u8282\u90fd\u53ef\u4ee5\u5728 <code class=\"filename\">src/include/access/htup_details.h</code> \u4e2d\u627e\u5230\u3002</p>\n<p lang=\"zh\">\u8981\u89e3\u91ca\u5b9e\u9645\u6570\u636e\uff0c\u5fc5\u987b\u501f\u52a9\u4ece\u5176\u4ed6\u8868\u4e2d\u83b7\u5f97\u7684\u4fe1\u606f\uff0c\u5176\u4e2d\u5927\u90e8\u5206\u6765\u81ea <code class=\"structname\">pg_attribute</code>\u3002\u8bc6\u522b\u5b57\u6bb5\u4f4d\u7f6e\u6240\u9700\u7684\u5173\u952e\u503c\u662f <code class=\"structfield\">attlen</code> \u548c <code class=\"structfield\">attalign</code>\u3002\u9664\u975e\u6240\u6709\u5b57\u6bb5\u90fd\u662f\u5b9a\u5bbd\u4e14\u6ca1\u6709\u7a7a\u503c\uff0c\u5426\u5219\u6ca1\u6709\u529e\u6cd5\u76f4\u63a5\u53d6\u5f97\u67d0\u4e2a\u7279\u5b9a\u5c5e\u6027\u3002\u6240\u6709\u8fd9\u4e9b\u6280\u5de7\u90fd\u5c01\u88c5\u5728 <em class=\"firstterm\">heap_getattr</em>\u3001<em class=\"firstterm\">fastgetattr</em> \u548c <em class=\"firstterm\">heap_getsysattr</em> \u8fd9\u4e9b\u51fd\u6570\u4e2d\u3002</p>\n<p lang=\"zh\">\u8bfb\u53d6\u6570\u636e\u65f6\uff0c\u9700\u8981\u4f9d\u6b21\u68c0\u67e5\u6bcf\u4e2a\u5c5e\u6027\u3002\u9996\u5148\u6839\u636e\u7a7a\u503c\u4f4d\u56fe\u5224\u65ad\u8be5\u5b57\u6bb5\u662f\u5426\u4e3a NULL\u3002\u5982\u679c\u662f\uff0c\u5c31\u7ee7\u7eed\u4e0b\u4e00\u4e2a\u3002\u7136\u540e\u786e\u8ba4\u5bf9\u9f50\u662f\u5426\u6b63\u786e\u3002\u5982\u679c\u5b57\u6bb5\u662f\u5b9a\u5bbd\u5b57\u6bb5\uff0c\u90a3\u4e48\u5b83\u7684\u6240\u6709\u5b57\u8282\u90fd\u662f\u76f4\u63a5\u6446\u653e\u7684\uff1b\u5982\u679c\u5b83\u662f\u53d8\u957f\u5b57\u6bb5\uff08attlen = -1\uff09\uff0c\u60c5\u51b5\u5c31\u4f1a\u7a0d\u590d\u6742\u4e00\u4e9b\u3002\u6240\u6709\u53d8\u957f\u6570\u636e\u7c7b\u578b\u90fd\u5171\u4eab\u4e00\u4e2a\u901a\u7528\u5934\u90e8\u7ed3\u6784\u4f53 <code class=\"type\">varlena</code>\uff0c\u5176\u4e2d\u5305\u542b\u5df2\u5b58\u50a8\u503c\u7684\u603b\u957f\u5ea6\u4ee5\u53ca\u4e00\u4e9b\u6807\u5fd7\u4f4d\u3002\u6839\u636e\u8fd9\u4e9b\u6807\u5fd7\uff0c\u6570\u636e\u53ef\u80fd\u662f\u884c\u5185\u5b58\u50a8\u7684\uff0c\u4e5f\u53ef\u80fd\u4f4d\u4e8e <acronym class=\"acronym\">TOAST</acronym> \u8868\u4e2d\uff1b\u5b83\u4e5f\u53ef\u80fd\u662f\u7ecf\u8fc7\u538b\u7f29\u7684\uff08\u89c1<a class=\"xref\" href=\"/docs/devel/storage-toast.html\" title=\"66.2.\u00a0TOAST\">\u7b2c\u00a066.2\u00a0\u8282</a>\uff09\u3002</p>\n</div>", "manual_path": "/docs/devel/storage-page-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/devel/storage-page-layout.html", "method": "same-major semantic node", "sha256": "e6342ac6dbc18d88c4c1a9a53b24c520b5ce2b76d9de4170ad8f151e1699e445", "language": "zh", "matched_nodes": ["#STORAGE-PAGE-LAYOUT/div[18]/div[2]/p[0]", "#STORAGE-PAGE-LAYOUT/div[18]/p[1]", "#STORAGE-PAGE-LAYOUT/div[18]/p[4]", "#STORAGE-PAGE-LAYOUT/div[18]/p[5]", "#STORAGE-PAGE-LAYOUT/div[18]/p[6]", "#STORAGE-PAGE-LAYOUT/div[1]"]}], "language": "zh", "original_text": {"/summary": "Physical row headers, null bitmap, alignment and column data.", "/category": "Physical structures", "/versions/20/description/0": "Physical row headers, null bitmap, alignment and column data.", "/versions/20/tables/0/title": "HeapTupleHeaderData Layout", "/versions/20/tables/0/rows/0/c2": "4 bytes", "/versions/20/tables/0/rows/0/c3": "insert XID stamp", "/versions/20/tables/0/rows/1/c2": "4 bytes", "/versions/20/tables/0/rows/1/c3": "delete XID stamp", "/versions/20/tables/0/rows/2/c2": "4 bytes", "/versions/20/tables/0/rows/2/c3": "insert and/or delete CID stamp (overlays with t_xvac)", "/versions/20/tables/0/rows/3/c2": "4 bytes", "/versions/20/tables/0/rows/3/c3": "XID for VACUUM operation moving a row version", "/versions/20/tables/0/rows/4/c2": "6 bytes", "/versions/20/tables/0/rows/4/c3": "current TID of this or newer row version", "/versions/20/tables/0/rows/5/c2": "2 bytes", "/versions/20/tables/0/rows/5/c3": "number of attributes, plus various flag bits", "/versions/20/tables/0/rows/6/c2": "2 bytes", "/versions/20/tables/0/rows/6/c3": "various flag bits", "/versions/20/tables/0/rows/7/c2": "1 byte", "/versions/20/tables/0/rows/7/c3": "offset to user data", "/versions/20/tables/0/columns/0/label": "Field", "/versions/20/tables/0/columns/1/label": "Type", "/versions/20/tables/0/columns/2/label": "Length", "/versions/20/tables/0/columns/3/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "ef036e64da1bc08b18151c8e2aba43834d424458c5e0595f3ad1315c6b05adc4"}, "comparison_data": {"layouts": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 bytes", "c3": "insert XID stamp"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 bytes", "c3": "delete XID stamp"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 bytes", "c3": "insert and/or delete CID stamp (overlays with t_xvac)"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 bytes", "c3": "XID for VACUUM operation moving a row version"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 bytes", "c3": "current TID of this or newer row version"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 bytes", "c3": "number of attributes, plus various flag bits"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 bytes", "c3": "various flag bits"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 byte", "c3": "offset to user data"}], "title": "HeapTupleHeaderData Layout", "columns": [{"key": "c0", "label": "Field"}, {"key": "c1", "label": "Type"}, {"key": "c2", "label": "Length"}, {"key": "c3", "label": "Description"}]}]}, "comparison_hash": "7f6e968716966dae8869d6c14f0a6aa229d745d4d4bde899b61eeec58c8d7ea0", "manual_language": "zh"}}}, "snapshot": {"facts": [], "tables": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u4e8b\u52a1\u7684 XID"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "\u5220\u9664\u4e8b\u52a1\u7684 XID"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 \u5b57\u8282", "c3": "\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 \u5b57\u8282", "c3": "VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 \u5b57\u8282", "c3": "\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 \u5b57\u8282", "c3": "\u5404\u79cd\u6807\u5fd7\u4f4d"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 \u5b57\u8282", "c3": "\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf"}], "title": "HeapTupleHeaderData \u5e03\u5c40", "columns": [{"key": "c0", "label": "\u5b57\u6bb5"}, {"key": "c1", "label": "\u7c7b\u578b"}, {"key": "c2", "label": "\u957f\u5ea6"}, {"key": "c3", "label": "\u8bf4\u660e"}]}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "https://pg.center/docs/18/storage-page-layout.html#STORAGE-TUPLE-LAYOUT", "path": "storage-page-layout.html", "label": "PostgreSQL 18 English manual", "sha256": "0d9f99e4cef5ea0a6741a74cab87052b929f7001730853c85d5e60d72179d355", "language": "en", "original_url": "/docs/18/storage-page-layout.html#STORAGE-TUPLE-LAYOUT"}], "sections": [], "signature": "", "description": ["\u7269\u7406\u884c\u9996\u90e8\u3001\u7a7a\u503c\u4f4d\u56fe\u3001\u5bf9\u9f50\u4e0e\u5217\u6570\u636e\u3002"], "manual_html": "<div class=\"sect2\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\">\n<dl class=\"toc\">\n<dt><span class=\"sect2\"><a href=\"/docs/18/storage-page-layout.html#STORAGE-TUPLE-LAYOUT\">66.6.1. \u8868\u884c\u5e03\u5c40</a></span></dt>\n</dl>\n</h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u6240\u6709\u8868\u884c\u7684\u7ed3\u6784\u90fd\u76f8\u540c\u3002\u5b83\u4eec\u90fd\u6709\u4e00\u4e2a\u56fa\u5b9a\u5927\u5c0f\u7684\u5934\u90e8\uff08\u5728\u5927\u591a\u6570\u673a\u5668\u4e0a\u5360 23 \u5b57\u8282\uff09\uff0c\u540e\u9762\u8ddf\u7740\u53ef\u9009\u7684\u7a7a\u503c\u4f4d\u56fe\u3001\u53ef\u9009\u7684\u5bf9\u8c61 ID \u5b57\u6bb5\u4ee5\u53ca\u7528\u6237\u6570\u636e\u3002\u5934\u90e8\u7684\u8be6\u7ec6\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/18/storage-page-layout.html#HEAPTUPLEHEADERDATA-TABLE\" title=\"\u8868\u00a066.4.\u00a0HeapTupleHeaderData \u5e03\u5c40\">\u8868\u00a066.4</a>\u3002\u5b9e\u9645\u7528\u6237\u6570\u636e\uff08\u884c\u7684\u5404\u5217\uff09\u4ece <code class=\"structfield\">t_hoff</code> \u6307\u793a\u7684\u504f\u79fb\u4f4d\u7f6e\u5f00\u59cb\uff0c\u5b83\u5fc5\u987b\u59cb\u7ec8\u662f\u8be5\u5e73\u53f0 MAXALIGN \u5bf9\u9f50\u5355\u4f4d\u7684\u6574\u6570\u500d\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASNULL</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u7a7a\u503c\u4f4d\u56fe\u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u7d27\u968f\u56fa\u5b9a\u5934\u90e8\u4e4b\u540e\uff0c\u5e76\u5360\u7528\u8db3\u591f\u591a\u7684\u5b57\u8282\uff0c\u4ee5\u4fbf\u4e3a\u6bcf\u4e2a\u6570\u636e\u5217\u63d0\u4f9b\u4e00\u4f4d\uff08\u4e5f\u5c31\u662f\u8bf4\uff0c\u5176\u4f4d\u6570\u7b49\u4e8e <code class=\"structfield\">t_infomask2</code> \u4e2d\u7684\u5c5e\u6027\u4e2a\u6570\uff09\u3002\u5728\u8fd9\u4e2a\u4f4d\u56fe\u4e2d\uff0c1 \u8868\u793a\u975e\u7a7a\uff0c0 \u8868\u793a\u7a7a\u503c\u3002\u5f53\u4f4d\u56fe\u4e0d\u5b58\u5728\u65f6\uff0c\u5047\u5b9a\u6240\u6709\u5217\u90fd\u975e\u7a7a\u3002\u53ea\u6709\u5f53 <em class=\"firstterm\">HEAP_HASOID_OLD</em> \u4f4d\u5728 <code class=\"structfield\">t_infomask</code> \u4e2d\u88ab\u7f6e\u4f4d\u65f6\uff0c\u5bf9\u8c61 ID \u624d\u5b58\u5728\u3002\u82e5\u5b58\u5728\uff0c\u5b83\u4f4d\u4e8e <code class=\"structfield\">t_hoff</code> \u8fb9\u754c\u4e4b\u524d\u3002\u4e3a\u4e86\u8ba9 <code class=\"structfield\">t_hoff</code> \u6210\u4e3a MAXALIGN \u7684\u6574\u6570\u500d\u6240\u9700\u7684\u4efb\u4f55\u586b\u5145\uff0c\u90fd\u4f1a\u51fa\u73b0\u5728\u7a7a\u503c\u4f4d\u56fe\u4e0e\u5bf9\u8c61 ID \u4e4b\u95f4\u3002\uff08\u8fd9\u53c8\u53cd\u8fc7\u6765\u4fdd\u8bc1\u4e86\u5bf9\u8c61 ID \u7684\u5bf9\u9f50\u662f\u5408\u9002\u7684\u3002\uff09</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a066.4.\u00a0HeapTupleHeaderData \u5e03\u5c40</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u5b57\u6bb5</th>\n<th lang=\"zh\">\u7c7b\u578b</th>\n<th lang=\"zh\">\u957f\u5ea6</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>t_xmin</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_xmax</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u5220\u9664\u4e8b\u52a1\u7684 XID</td>\n</tr>\n<tr>\n<td>t_cid</td>\n<td>CommandId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">\u63d2\u5165\u548c\uff0f\u6216\u5220\u9664\u547d\u4ee4\u7684 CID\uff0c\u4e0e t_xvac \u5171\u7528\u5b58\u50a8\u4f4d\u7f6e</td>\n</tr>\n<tr>\n<td>t_xvac</td>\n<td>TransactionId</td>\n<td lang=\"zh\">4 \u5b57\u8282</td>\n<td lang=\"zh\">VACUUM \u64cd\u4f5c\u79fb\u52a8\u884c\u7248\u672c\u65f6\u4f7f\u7528\u7684 XID</td>\n</tr>\n<tr>\n<td>t_ctid</td>\n<td>ItemPointerData</td>\n<td lang=\"zh\">6 \u5b57\u8282</td>\n<td lang=\"zh\">\u672c\u884c\u7248\u672c\u6216\u8f83\u65b0\u884c\u7248\u672c\u7684\u5f53\u524d TID</td>\n</tr>\n<tr>\n<td>t_infomask2</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5c5e\u6027\u6570\u91cf\u53ca\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_infomask</td>\n<td>uint16</td>\n<td lang=\"zh\">2 \u5b57\u8282</td>\n<td lang=\"zh\">\u5404\u79cd\u6807\u5fd7\u4f4d</td>\n</tr>\n<tr>\n<td>t_hoff</td>\n<td>uint8</td>\n<td lang=\"zh\">1 \u5b57\u8282</td>\n<td lang=\"zh\">\u7528\u6237\u6570\u636e\u7684\u504f\u79fb\u91cf</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u6240\u6709\u7ec6\u8282\u90fd\u53ef\u4ee5\u5728 <code class=\"filename\">src/include/access/htup_details.h</code> \u4e2d\u627e\u5230\u3002</p>\n<p lang=\"zh\">\u8981\u89e3\u91ca\u5b9e\u9645\u6570\u636e\uff0c\u5fc5\u987b\u501f\u52a9\u4ece\u5176\u4ed6\u8868\u4e2d\u83b7\u5f97\u7684\u4fe1\u606f\uff0c\u5176\u4e2d\u5927\u90e8\u5206\u6765\u81ea <code class=\"structname\">pg_attribute</code>\u3002\u8bc6\u522b\u5b57\u6bb5\u4f4d\u7f6e\u6240\u9700\u7684\u5173\u952e\u503c\u662f <code class=\"structfield\">attlen</code> \u548c <code class=\"structfield\">attalign</code>\u3002\u9664\u975e\u6240\u6709\u5b57\u6bb5\u90fd\u662f\u5b9a\u5bbd\u4e14\u6ca1\u6709\u7a7a\u503c\uff0c\u5426\u5219\u6ca1\u6709\u529e\u6cd5\u76f4\u63a5\u53d6\u5f97\u67d0\u4e2a\u7279\u5b9a\u5c5e\u6027\u3002\u6240\u6709\u8fd9\u4e9b\u6280\u5de7\u90fd\u5c01\u88c5\u5728 <em class=\"firstterm\">heap_getattr</em>\u3001<em class=\"firstterm\">fastgetattr</em> \u548c <em class=\"firstterm\">heap_getsysattr</em> \u8fd9\u4e9b\u51fd\u6570\u4e2d\u3002</p>\n<p lang=\"zh\">\u8bfb\u53d6\u6570\u636e\u65f6\uff0c\u9700\u8981\u4f9d\u6b21\u68c0\u67e5\u6bcf\u4e2a\u5c5e\u6027\u3002\u9996\u5148\u6839\u636e\u7a7a\u503c\u4f4d\u56fe\u5224\u65ad\u8be5\u5b57\u6bb5\u662f\u5426\u4e3a NULL\u3002\u5982\u679c\u662f\uff0c\u5c31\u7ee7\u7eed\u4e0b\u4e00\u4e2a\u3002\u7136\u540e\u786e\u8ba4\u5bf9\u9f50\u662f\u5426\u6b63\u786e\u3002\u5982\u679c\u5b57\u6bb5\u662f\u5b9a\u5bbd\u5b57\u6bb5\uff0c\u90a3\u4e48\u5b83\u7684\u6240\u6709\u5b57\u8282\u90fd\u662f\u76f4\u63a5\u6446\u653e\u7684\uff1b\u5982\u679c\u5b83\u662f\u53d8\u957f\u5b57\u6bb5\uff08attlen = -1\uff09\uff0c\u60c5\u51b5\u5c31\u4f1a\u7a0d\u590d\u6742\u4e00\u4e9b\u3002\u6240\u6709\u53d8\u957f\u6570\u636e\u7c7b\u578b\u90fd\u5171\u4eab\u4e00\u4e2a\u901a\u7528\u5934\u90e8\u7ed3\u6784\u4f53 <code class=\"type\">struct varlena</code>\uff0c\u5176\u4e2d\u5305\u542b\u5df2\u5b58\u50a8\u503c\u7684\u603b\u957f\u5ea6\u4ee5\u53ca\u4e00\u4e9b\u6807\u5fd7\u4f4d\u3002\u6839\u636e\u8fd9\u4e9b\u6807\u5fd7\uff0c\u6570\u636e\u53ef\u80fd\u662f\u884c\u5185\u5b58\u50a8\u7684\uff0c\u4e5f\u53ef\u80fd\u4f4d\u4e8e <acronym class=\"acronym\">TOAST</acronym> \u8868\u4e2d\uff1b\u5b83\u4e5f\u53ef\u80fd\u662f\u7ecf\u8fc7\u538b\u7f29\u7684\uff08\u89c1<a class=\"xref\" href=\"/docs/18/storage-toast.html\" title=\"66.2.\u00a0TOAST\">\u7b2c\u00a066.2\u00a0\u8282</a>\uff09\u3002</p>\n</div>", "manual_path": "/docs/18/storage-page-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/18/storage-page-layout.html", "method": "same-major semantic node", "sha256": "e504ff90f2cabf6f71046d80f1cc8d49664ba2f2f4bce0ef26e955d6c5580ab2", "language": "zh", "matched_nodes": ["#STORAGE-PAGE-LAYOUT/div[18]/div[2]/p[0]", "#STORAGE-PAGE-LAYOUT/div[18]/p[1]", "#STORAGE-PAGE-LAYOUT/div[18]/p[4]", "#STORAGE-PAGE-LAYOUT/div[18]/p[5]", "#STORAGE-PAGE-LAYOUT/div[18]/p[6]", "#STORAGE-PAGE-LAYOUT/div[1]"]}], "language": "zh", "original_text": {"/versions/18/description/0": "Physical row headers, null bitmap, alignment and column data.", "/versions/18/tables/0/title": "HeapTupleHeaderData Layout", "/versions/18/tables/0/rows/0/c2": "4 bytes", "/versions/18/tables/0/rows/0/c3": "insert XID stamp", "/versions/18/tables/0/rows/1/c2": "4 bytes", "/versions/18/tables/0/rows/1/c3": "delete XID stamp", "/versions/18/tables/0/rows/2/c2": "4 bytes", "/versions/18/tables/0/rows/2/c3": "insert and/or delete CID stamp (overlays with t_xvac)", "/versions/18/tables/0/rows/3/c2": "4 bytes", "/versions/18/tables/0/rows/3/c3": "XID for VACUUM operation moving a row version", "/versions/18/tables/0/rows/4/c2": "6 bytes", "/versions/18/tables/0/rows/4/c3": "current TID of this or newer row version", "/versions/18/tables/0/rows/5/c2": "2 bytes", "/versions/18/tables/0/rows/5/c3": "number of attributes, plus various flag bits", "/versions/18/tables/0/rows/6/c2": "2 bytes", "/versions/18/tables/0/rows/6/c3": "various flag bits", "/versions/18/tables/0/rows/7/c2": "1 byte", "/versions/18/tables/0/rows/7/c3": "offset to user data", "/versions/18/tables/0/columns/0/label": "Field", "/versions/18/tables/0/columns/1/label": "Type", "/versions/18/tables/0/columns/2/label": "Length", "/versions/18/tables/0/columns/3/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "f0a44bd96ec79f5387e9c512ba7a6444f819cd1a32e4c0cdf82f78d6c9d7d5b2"}, "comparison_data": {"layouts": [{"key": "layout-2", "rows": [{"c0": "t_xmin", "c1": "TransactionId", "c2": "4 bytes", "c3": "insert XID stamp"}, {"c0": "t_xmax", "c1": "TransactionId", "c2": "4 bytes", "c3": "delete XID stamp"}, {"c0": "t_cid", "c1": "CommandId", "c2": "4 bytes", "c3": "insert and/or delete CID stamp (overlays with t_xvac)"}, {"c0": "t_xvac", "c1": "TransactionId", "c2": "4 bytes", "c3": "XID for VACUUM operation moving a row version"}, {"c0": "t_ctid", "c1": "ItemPointerData", "c2": "6 bytes", "c3": "current TID of this or newer row version"}, {"c0": "t_infomask2", "c1": "uint16", "c2": "2 bytes", "c3": "number of attributes, plus various flag bits"}, {"c0": "t_infomask", "c1": "uint16", "c2": "2 bytes", "c3": "various flag bits"}, {"c0": "t_hoff", "c1": "uint8", "c2": "1 byte", "c3": "offset to user data"}], "title": "HeapTupleHeaderData Layout", "columns": [{"key": "c0", "label": "Field"}, {"key": "c1", "label": "Type"}, {"key": "c2", "label": "Length"}, {"key": "c3", "label": "Description"}]}]}, "comparison_hash": "7f6e968716966dae8869d6c14f0a6aa229d745d4d4bde899b61eeec58c8d7ea0", "manual_language": "zh"}, "comparison": {"left": "10", "right": "11", "status": "added", "diff": "--- PostgreSQL 10\n+++ PostgreSQL 11\n@@ -1 +1,76 @@\n-\u8be5\u7248\u672a\u6536\u5f55\n+{\n+  \"layouts\": [\n+    {\n+      \"columns\": [\n+        {\n+          \"key\": \"c0\",\n+          \"label\": \"Field\"\n+        },\n+        {\n+          \"key\": \"c1\",\n+          \"label\": \"Type\"\n+        },\n+        {\n+          \"key\": \"c2\",\n+          \"label\": \"Length\"\n+        },\n+        {\n+          \"key\": \"c3\",\n+          \"label\": \"Description\"\n+        }\n+      ],\n+      \"key\": \"layout-2\",\n+      \"rows\": [\n+        {\n+          \"c0\": \"t_xmin\",\n+          \"c1\": \"TransactionId\",\n+          \"c2\": \"4 bytes\",\n+          \"c3\": \"insert XID stamp\"\n+        },\n+        {\n+          \"c0\": \"t_xmax\",\n+          \"c1\": \"TransactionId\",\n+          \"c2\": \"4 bytes\",\n+          \"c3\": \"delete XID stamp\"\n+        },\n+        {\n+          \"c0\": \"t_cid\",\n+          \"c1\": \"CommandId\",\n+          \"c2\": \"4 bytes\",\n+          \"c3\": \"insert and/or delete CID stamp (overlays with t_xvac)\"\n+        },\n+        {\n+          \"c0\": \"t_xvac\",\n+          \"c1\": \"TransactionId\",\n+          \"c2\": \"4 bytes\",\n+          \"c3\": \"XID for VACUUM operation moving a row version\"\n+        },\n+        {\n+          \"c0\": \"t_ctid\",\n+          \"c1\": \"ItemPointerData\",\n+          \"c2\": \"6 bytes\",\n+          \"c3\": \"current TID of this or newer row version\"\n+        },\n+        {\n+          \"c0\": \"t_infomask2\",\n+          \"c1\": \"uint16\",\n+          \"c2\": \"2 bytes\",\n+          \"c3\": \"number of attributes, plus various flag bits\"\n+        },\n+        {\n+          \"c0\": \"t_infomask\",\n+          \"c1\": \"uint16\",\n+          \"c2\": \"2 bytes\",\n+          \"c3\": \"various flag bits\"\n+        },\n+        {\n+          \"c0\": \"t_hoff\",\n+          \"c1\": \"uint8\",\n+          \"c2\": \"1 byte\",\n+          \"c3\": \"offset to user data\"\n+        }\n+      ],\n+      \"title\": \"HeapTupleHeaderData Layout\"\n+    }\n+  ]\n+}"}}