Hi John!
Sorry for the late reply. It took me some time to fix a random bug.
In the case where we don't know the slice size, how about the other
aspect of my question above: Might it be simpler and less overhead to
decompress entire chunks at a time? If so, I think it would be
enlightening to compare performance.
Good idea. I've tested your propopal with scripts and patch v5 in the attachment:
master patch v4 patch v5
comp. beg. 4364ms 1505ms 1529ms
comp. end 28321ms 31202ms 26916ms
uncomp. beg. 3474ms 1513ms 1523ms
uncomp. end 27416ms 30260ms 25888ms
The proposal improves suffix query performance greatly
with less calls to the decompression function.
Besides, do you have any other suggestions for the structure of DetoastIterator or ToastBuffer?
Maybe they can be designed to be more reasonable.
Thanks again for the proposal.
--