Heikki Linnakangas <hlinn...@iki.fi> writes: > On 12/01/2021 18:19, Andrey Borodin wrote: >> Thanks! Looks good to me.
> Pushed, thanks! I noticed that gist_page_items() thinks it can hold inter_call_data->rel open across a series of calls. That's completely unsafe: the executor might not run the call series to completion (see LIMIT), resulting in relcache leak complaints. I suspect that it might have cache-flush hazards even without that. I think this code needs to be rewritten to do all the interesting work in the first call. Or maybe better, return the results as a tuplestore so you don't have to do multiple calls at all. regards, tom lane