I know some basics of BTree data structure, but I want to know how actual data is referenced in pgsql. Let's take boolean
for example, if we only have two values in a simple BTree (true
/false
) - it is obvious, we would just have two nodes (actually one node with two values, but let's talk super simple), but in pgsql we are also storing references to the actual data. How would such an index look like in pgsql structurally?
Would it be like two nodes (for true/false) with some list of references to the actual rows, or would it be like head with false
, and two linked lists attached to it (false for left and true for right or something like that)?
This question might be very stupid, but I could not find anything useful on google.