Re: [HACKERS] Pluggable storage - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: [HACKERS] Pluggable storage
Date
Msg-id CAPpHfdv=eZHFNGKSs6LGbR_WH-iDRM=yvHO0DaQgwJXMEFfZCQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Pluggable storage  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] Pluggable storage
Re: [HACKERS] Pluggable storage
List pgsql-hackers
On Wed, Jun 21, 2017 at 10:47 PM, Robert Haas <robertmhaas@gmail.com> wrote:
On Mon, Jun 12, 2017 at 9:50 PM, Haribabu Kommi
<kommi.haribabu@gmail.com> wrote:
> Open Items:
>
> 1. The BitmapHeapScan and TableSampleScan are tightly coupled with
> HeapTuple and HeapScanDesc, So these scans are directly operating
> on those structures and providing the result.
>
> These scan types may not be applicable to different storage formats.
> So how to handle them?

I think that BitmapHeapScan, at least, is applicable to any table AM
that has TIDs.   It seems to me that in general we can imagine three
kinds of table AMs:

1. Table AMs where a tuple can be efficiently located by a real TID.
By a real TID, I mean that the block number part is really a block
number and the item ID is really a location within the block.  These
are necessarily quite similar to our current heap, but they can change
the tuple format and page format to some degree, and it seems like in
many cases it should be possible to plug them into our existing index
AMs without too much heartache.  Both index scans and bitmap index
scans ought to work.

If #1 is only about changing tuple and page formats, then could be much simpler than the patch upthread?  We can implement "page format access methods" with routines for insertion, update, pruning and deletion of tuples *in particular page*.  There is no need to redefine high-level logic for scanning heap, doing updates and so on...

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company 

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Pluggable storage
Next
From: Alexander Korotkov
Date:
Subject: Re: [HACKERS] Pluggable storage