Re: Index-only scans for GiST. - Mailing list pgsql-hackers

From Anastasia Lubennikova
Subject Re: Index-only scans for GiST.
Date
Msg-id CAP4vRV40pq-9iAD7eEHnrk_19jkuJ-KzE0raMj3kW2QBvY+aCg@mail.gmail.com
Whole thread Raw
In response to Re: Index-only scans for GiST.  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Responses Re: Index-only scans for GiST.
List pgsql-hackers

I add MemoryContext listCxt to avoid memory leak. listCxt is created once in gistrescan (only for index-only scan plan ) and reseted when scan of the leaf page is finished.

I do not sure if the problem was completely solved, so I wait for feedback.

* What's the reason for turning GISTScanOpaqueData.pageData from an array to a List?

This array is field of structure GISTScanOpaqueData. Memory for that structure allocated in function gistbeginscan(). The array is static so it's declared only one time in structure:
GISTSearchHeapItem  pageData [BLCKSZ/sizeof(IndexTupleData)]

But how could we know size of array if we don't know what data would be returned? I mean type and amount.

I asked Alexander about that and he offered me to use List instead of Array.

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: star schema and the optimizer
Next
From: Marc Cousin
Date:
Subject: Re: star schema and the optimizer