Hi Tom, > > Which brings a question, maybe it shouldn't > > take that much space on disk. > > How would you make it optional? In particular, what are you going to > to when it's time to update a row (and therefore insert a ctid link) > and the page is already completely full?
In other words, if I have an ItemPointer to an old tuple and try to UPDATE it, t_ctid allows me to find the next page with another HOT chain and, if possible, add a new tuple to that HOT chain. And although there are newer versions of the tuple they are not necessarily alive, e.g. if the corresponding transactions were aborted, or they are running and it's not clear whether they will succeed or not. I didn't think about this scenario. It also explains why t_ctid can't be variable in size depending on whether it points to a tuple in the same page or in the different one. Next time we change t_ctid its size may change which will require resizing the tuple, and the whole story becomes very complicated. I think I get it now. Many thanks! Just to clarify, is t_ctid used for anything _but_ HOT? -- Best regards, Aleksander Alekseev