Re: [HACKERS] Pluggable storage

Поиск
Список
Период
Сортировка
От Haribabu Kommi
Тема Re: [HACKERS] Pluggable storage
Дата
Msg-id CAJrrPGcYWE1g_jhTyOLDX+A-UUf8CADGwWBO8FGKqfQgRq9BCg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Pluggable storage  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Ответы Re: [HACKERS] Pluggable storage  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Список pgsql-hackers


On Tue, Sep 12, 2017 at 3:52 PM, Haribabu Kommi <kommi.haribabu@gmail.com> wrote:

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 these
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 
implementation.

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.

1. StorageScanDesc
2. HeapPageScanDesc

The StorageScanDesc contains the minimal information that is required outside
the Storage routine and this must be provided by all storage routines. This
structure contains minimal information such as relation, snapshot, buffer and
etc.

The HeapPageScanDesc contains other extra information that is required for
Bitmap Heap and Sample scans to work. This structure contains the information
of blocks, visible offsets and etc. Currently this structure is used only in 
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
0008-Remove-HeapScanDesc-usage-outside-heap.patch 

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.

Regards,
Hari Babu
Fujitsu Australia
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: [HACKERS] psql: new help related to variables are not tooreadable
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: [HACKERS] <> join selectivity estimate question