|From:||Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>|
|To:||Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>|
|Cc:||Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>|
|Subject:||Re: Pluggable storage|
|Views:||Raw Message | Whole Thread | Download mbox|
On Tue, Sep 12, 2017 at 3:52 PM, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
> * int rs_ntuples; /* number of visible tuples on page */*
> * OffsetNumber rs_vistuples[MaxHeapTuplesPerPage]; /* their offsets */*
> *tsm_system_rows.c, nodeBitmapHeapscan.c, nodesamplescan.c*
> *Used for retrieve the offsets mainly Bitmap and sample scans.*
> I think rest of the above parameters usage other than heap can be changed
> once the Bitmap and Sample scans are modified to use the storage routines
> while returning the tuple instead of their own implementations. I feel
> scans are the major users of the rest of the parameters. This approach may
> need to some more API's to get rid of Bitmap and sample scan's own
Instead of modifying the Bitmap Heap and Sample scan's to avoid referring
the internal members of the HeapScanDesc, I divided the HeapScanDesc
into two parts.
The StorageScanDesc contains the minimal information that is required
the Storage routine and this must be provided by all storage routines. This
structure contains minimal information such as relation, snapshot, buffer
The HeapPageScanDesc contains other extra information that is required for
Bitmap Heap and Sample scans to work. This structure contains the
of blocks, visible offsets and etc. Currently this structure is used only
Bitmap Heap and Sample scan and it's supported contrib modules, except
the pgstattuple module. The pgstattuple needs some additional changes.
By adding additional storage API to return HeapPageScanDesc as it required
by the Bitmap Heap and Sample scan's and this API is called only in these
two scan's. And also these scan methods are choosen by the planner only
when the storage routine supports to returning of HeapPageScanDesc API.
Currently Implemented the planner support only for Bitmap, yet to do it
for Sample scan.
With the above approach, I removed all the references of HeapScanDesc
outside the heap. The changes of this approach is available in the
Suggestions/comments with the above approach.
Because of a recent commit in the master, there was an OID conflict with
the other patches. Rebased patches are attached.
|Next Message||Ashutosh Bapat||2017-09-14 05:20:28||Re: <> join selectivity estimate question|
|Previous Message||Fabien COELHO||2017-09-14 05:15:40||Re: psql: new help related to variables are not too readable|