Virender Singla <virender....@gmail.com> writes: > Why do Toast tables have it's own visibility map and xmin, xmax columns etc? > Isn't it increasing row size in a toast table and adding more complexity?
There are advantages to having the same low-level format for toast tables as regular tables --- for example, that you can look into a toast table for debugging purposes with normal SQL queries. Even if we weren't tied to that format for disk-storage-compatibility reasons, I'd be disinclined to change it. It might be feasible to drop the visibility map for toast tables, though. I agree that's not buying much, since ordinary queries don't consult it. Not sure if there'd be a win proportional to the added code complexity. regards, tom lane