On Thu, Feb 11, 2021 at 7:36 AM Dilip Kumar <dilipbal...@gmail.com> wrote: > W.R.T the attached patch, In HeapTupleHeaderGetDatum, we don't even > attempt to detoast if there is no external field in the tuple, in POC > I have got rid of that check, but I think we might need to do better. > Maybe we can add a flag in infomask to detect whether the tuple has > any compressed data or not as we have for detecting the external data > (HEAP_HASEXTERNAL).
No. This feature isn't close to being important enough to justify consuming an infomask bit. I don't really see why we need it anyway. If array construction already categorically detoasts, why can't we do the same thing here? Would it really cost that much? In what case? Having compressed values in a record we're going to store on disk actually seems like a pretty dumb idea. We might end up trying to recompress something parts of which have already been compressed. -- Robert Haas EDB: http://www.enterprisedb.com