- **Description**: A specialized index type (provided by the `bloom` extension) that implement a **Probabilistic Data Structure**. It is designed for tables where queries involve arbitrary combinations of many different columns, but only require equality checks.
- **Physical Implementation**:
- **Bit Signatures**: For each heap row, a fixed-length **Signature** (bit-vector) is generated. Each indexed column is hashed multiple times to set specific bits in this signature.
- **The Page Format**: Signatures are stored sequentially in standard 8KB pages. Unlike B-Tree, there is no tree structure; the entire index is a series of flat signature pages.
- **Signature Length**: Configurable via `signature_size`. A larger signature reduces the "False Positive" rate but increases the index size.
- **Query Logic**:
- When a query is received, a "Query Signature" is created for the columns provided in the `WHERE` clause.
- The engine performs a sequential scan of the **Index** (not the table), performing a bitwise **AND** between the query signature and each stored row signature.
- If `(RowSignature & QuerySignature) == QuerySignature`, it is a potential match.
- **Supported Operators**: `=`.
- **Special Features**:
- **Space Efficiency**: Can be significantly smaller than multiple B-Trees or a single wide GIN/GiST index.
- **Probabilistic**: Can return **False Positives** (signatures match by coincidence). Postgres handles this by always performing a "Recheck" against the actual heap tuple. It never returns "False Negatives."
- **Metaphor**: A club bouncer with a very short memory. He doesn't remember your face, but he remembers that you were wearing a red hat and blue shoes. If he sees someone else in a red hat and blue shoes, he might let them in by mistake (False Positive), but he'll never accidentally kick out the real guest (False Negative).