{"Entry":{"collection":"plan","key":"bitmapor","name":"BitmapOr","aliases":["BitmapOr","T_BitmapOr"],"metadata":{"aliases":["BitmapOr","T_BitmapOr"],"category":"Bitmap","content_hash":"7f9182fb8e68ec6e2d9cef66a3b2e1134d354dc29d296ee25b10a06ecfec7c3f","imported_at":"2026-09-30T00:40:44.03129+08:00","name":"BitmapOr","name_zh":"BitmapOr","slug":"bitmapor","summary":"Unions bitmaps produced by its child plans."}},"Definition":{"Collection":"plan","Key":"bitmapor","SourceDatabase":"center","Version":"18","SourceTable":"plan_node","SourceKey":"bitmapor","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","Facts":{"comparison_data":{"initializer":"ExecInitBitmapOr","memory_mechanism":"bitmap-lossification","node_tag":"T_BitmapOr","parallel_callbacks":[],"partial_modes":[],"strategies":[],"text_names":["BitmapOr"]},"comparison_hash":"c0ca503a6029c37ec720213dcdc3094997eb194d4920da68f94a7420d3e8f1d2","description":["Unions bitmaps produced by its child plans."],"evidence_kind":"source and documentation","explain_names":["BitmapOr"],"explain_prefixes":["Parallel","Async"],"facts":[{"label":"Core node tag","value":"T_BitmapOr"},{"label":"Structured EXPLAIN Node Type","value":"BitmapOr"},{"label":"Inputs","value":"Bitmap-producing child plans"},{"label":"Output","value":"Tuple-location bitmap, not a tuple stream"},{"label":"Executor initializer","value":"ExecInitBitmapOr"},{"label":"Memory mechanism","value":"bitmap-lossification"}],"memory":{"description":"The node allocates a tuple-location bitmap using a work_mem-derived budget. A bitmap can retain page-level lossy entries instead of every tuple location; heap rechecks then remain necessary.","evidence":[{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/executor/nodeBitmapOr.c","path":"src/backend/executor/nodeBitmapOr.c","sha256":"81e2aeb0cc0d4cece84b7514385636cd11ea0e1faab93c721d4c3b86c20c9104","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/nodes/tidbitmap.c","path":"src/backend/nodes/tidbitmap.c","sha256":"e2453b7155d55db8c3a59bc929362f01d3f9692b0a483e5aa81a7b6c50db6102","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"}],"mechanism":"bitmap-lossification","source_notes":[]},"node_tag":"T_BitmapOr","parallel_callbacks":[],"partial_modes":[],"related":[{"label":"EXPLAIN","url":"/wiki/sql/explain/?v=18"},{"label":"Using EXPLAIN","url":"/docs/18/using-explain.html"},{"label":"Parallel plans","url":"/docs/18/parallel-plans.html"},{"label":"work_mem","url":"/wiki/guc/work_mem/?v=18"}],"release":{"channel":"stable","label":"18.6","major":"18","ref":"PostgreSQL 18.6 source archive","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_snapshot_utc":"","source_url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},"runtime_verified":false,"sections":[{"paragraphs":["Structured formats use the Node Type above. Text-format spellings can also include operation, strategy, join type, scan direction or aggregation-stage attributes.","Text names recorded by this source: BitmapOr.","Parallel-aware and parallel-safe are different plan properties. A node running inside a parallel worker is not necessarily a parallel-aware node."],"title":"EXPLAIN names and attributes"},{"paragraphs":["The node allocates a tuple-location bitmap using a work_mem-derived budget. A bitmap can retain page-level lossy entries instead of every tuple location; heap rechecks then remain necessary."],"title":"Memory and temporary storage"},{"paragraphs":["The source callbacks below can coordinate execution or collect worker instrumentation. Their presence is not a blanket claim that this node supports a shared parallel scan or shared state.","Callbacks in this build: none extracted from this node implementation."],"title":"Parallel execution and instrumentation"},{"paragraphs":["BitmapAnd and BitmapOr nodes always report their actual row counts as zero, due to implementation limitations."],"title":"Same-version manual discussion"},{"paragraphs":["NOTES BitmapOr nodes don't make use of their left and right subtrees, rather they maintain a list of subplans, much like Append nodes. The logic is much simpler than Append, however, since we needn't cope with forward/backward execution.","call ExecInitNode on each of the plans to be executed and save the results into the array \"bitmapplanstates\".","BitmapOr plans don't have expression contexts because they never call ExecQual or ExecProject. They don't need any tuple slots either.","We can special-case BitmapIndexScan children to avoid an explicit tbm_union step for each child: just pass down the current result bitmap and let the child OR directly into it.","ExecReScan doesn't know about my subplans, so I have to do changed-parameter signaling myself."],"title":"Executor implementation notes"},{"code":"case T_BitmapOr:\n\t\t\tpname = sname = \"BitmapOr\";\n\t\t\tbreak;","title":"EXPLAIN identity in core source"}],"source_inventory":{"executor":"src/backend/executor/execProcnode.c","explain":"src/backend/commands/explain.c","implementation":"src/backend/executor/nodeBitmapOr.c"},"sources":[{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/commands/explain.c:1418","line":1418,"path":"src/backend/commands/explain.c","sha256":"34c86d6070224a0e981efef51f79101d6d505e5874f1684ace183034bab14bb4","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/executor/execProcnode.c:201","line":201,"path":"src/backend/executor/execProcnode.c","sha256":"f8a06a3f539077249b20664b2812433db6d7bd12b2c0ca633525db43d06f112a","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/executor/nodeBitmapOr.c","path":"src/backend/executor/nodeBitmapOr.c","sha256":"81e2aeb0cc0d4cece84b7514385636cd11ea0e1faab93c721d4c3b86c20c9104","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/include/nodes/plannodes.h","path":"src/include/nodes/plannodes.h","sha256":"52422b327a8049fbbb20d8b96008a0fc0a6fafa60f7eff3c695d5b2e83830120","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/nodes/tidbitmap.c","path":"src/backend/nodes/tidbitmap.c","sha256":"e2453b7155d55db8c3a59bc929362f01d3f9692b0a483e5aa81a7b6c50db6102","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"label":"PostgreSQL 18.6 · using-explain","path":"using-explain.html","sha256":"60040c30180093418a0affe56dd27dff9df2504b705b38039589e458bf5c31ed","url":"/docs/18/using-explain.html#USING-EXPLAIN-CAVEATS"}],"strategies":[],"tables":[{"columns":[{"key":"label","label":"Text-format label"},{"key":"identity","label":"Structured node identity"}],"key":"explain-labels","rows":[{"identity":"BitmapOr","label":"BitmapOr"}],"title":"EXPLAIN labels in this source build"}]},"ManualEvidence":{"release":{"channel":"stable","label":"18.6","major":"18","ref":"PostgreSQL 18.6 source archive","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_snapshot_utc":"","source_url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},"sources":[{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/commands/explain.c:1418","line":1418,"path":"src/backend/commands/explain.c","sha256":"34c86d6070224a0e981efef51f79101d6d505e5874f1684ace183034bab14bb4","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/executor/execProcnode.c:201","line":201,"path":"src/backend/executor/execProcnode.c","sha256":"f8a06a3f539077249b20664b2812433db6d7bd12b2c0ca633525db43d06f112a","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/executor/nodeBitmapOr.c","path":"src/backend/executor/nodeBitmapOr.c","sha256":"81e2aeb0cc0d4cece84b7514385636cd11ea0e1faab93c721d4c3b86c20c9104","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/include/nodes/plannodes.h","path":"src/include/nodes/plannodes.h","sha256":"52422b327a8049fbbb20d8b96008a0fc0a6fafa60f7eff3c695d5b2e83830120","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/nodes/tidbitmap.c","path":"src/backend/nodes/tidbitmap.c","sha256":"e2453b7155d55db8c3a59bc929362f01d3f9692b0a483e5aa81a7b6c50db6102","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"label":"PostgreSQL 18.6 · using-explain","path":"using-explain.html","sha256":"60040c30180093418a0affe56dd27dff9df2504b705b38039589e458bf5c31ed","url":"/docs/18/using-explain.html#USING-EXPLAIN-CAVEATS"}]},"MeasuredEvidence":{"runtime_verified":false}},"Text":{"Collection":"plan","Key":"bitmapor","SourceDatabase":"center","Version":"18","Locale":"en","Title":"BitmapOr","Summary":"Unions bitmaps produced by its child plans.","BodyHTML":"\u003cp\u003eUnions bitmaps produced by its child plans.\u003c/p\u003e","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","ContentHash":"b6bfa268201b42bd46d5b21d3df3c98a49c8c68b9984227d5c58e303b15d79be","Payload":{"description":["Unions bitmaps produced by its child plans."],"related":[{"label":"EXPLAIN","url":"/wiki/sql/explain/?v=18"},{"label":"Using EXPLAIN","url":"/docs/18/using-explain.html"},{"label":"Parallel plans","url":"/docs/18/parallel-plans.html"},{"label":"work_mem","url":"/wiki/guc/work_mem/?v=18"}],"sections":[{"paragraphs":["Structured formats use the Node Type above. Text-format spellings can also include operation, strategy, join type, scan direction or aggregation-stage attributes.","Text names recorded by this source: BitmapOr.","Parallel-aware and parallel-safe are different plan properties. A node running inside a parallel worker is not necessarily a parallel-aware node."],"title":"EXPLAIN names and attributes"},{"paragraphs":["The node allocates a tuple-location bitmap using a work_mem-derived budget. A bitmap can retain page-level lossy entries instead of every tuple location; heap rechecks then remain necessary."],"title":"Memory and temporary storage"},{"paragraphs":["The source callbacks below can coordinate execution or collect worker instrumentation. Their presence is not a blanket claim that this node supports a shared parallel scan or shared state.","Callbacks in this build: none extracted from this node implementation."],"title":"Parallel execution and instrumentation"},{"paragraphs":["BitmapAnd and BitmapOr nodes always report their actual row counts as zero, due to implementation limitations."],"title":"Same-version manual discussion"},{"paragraphs":["NOTES BitmapOr nodes don't make use of their left and right subtrees, rather they maintain a list of subplans, much like Append nodes. The logic is much simpler than Append, however, since we needn't cope with forward/backward execution.","call ExecInitNode on each of the plans to be executed and save the results into the array \"bitmapplanstates\".","BitmapOr plans don't have expression contexts because they never call ExecQual or ExecProject. They don't need any tuple slots either.","We can special-case BitmapIndexScan children to avoid an explicit tbm_union step for each child: just pass down the current result bitmap and let the child OR directly into it.","ExecReScan doesn't know about my subplans, so I have to do changed-parameter signaling myself."],"title":"Executor implementation notes"},{"code":"case T_BitmapOr:\n\t\t\tpname = sname = \"BitmapOr\";\n\t\t\tbreak;","title":"EXPLAIN identity in core source"}],"tables":[{"columns":[{"key":"label","label":"Text-format label"},{"key":"identity","label":"Structured node identity"}],"key":"explain-labels","rows":[{"identity":"BitmapOr","label":"BitmapOr"}],"title":"EXPLAIN labels in this source build"}]}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
