Re: Pluggable Storage - Andres's take - Mailing list pgsql-hackers

From Ashwin Agrawal
Subject Re: Pluggable Storage - Andres's take
Date
Msg-id CALfoeiuuWUt-xPnekcVdhp-a-CRDGyCYV-Jcg=W_xuZDd1xopw@mail.gmail.com
Whole thread Raw
In response to Re: Pluggable Storage - Andres's take  (Andres Freund <andres@anarazel.de>)
Responses Re: Pluggable Storage - Andres's take
List pgsql-hackers

On Wed, May 15, 2019 at 11:54 AM Andres Freund <andres@anarazel.de> wrote:
Attached is a prototype of a variation of this. I added a
table_tuple_tid_valid(TableScanDesc sscan, ItemPointer tid)
callback / wrapper. Currently it just takes a "plain" scan, but we could
add a separate table_beginscan variant too.

For heap that just means we can just use HeapScanDesc's rs_nblock to
filter out invalid tids, and we only need to call
RelationGetNumberOfBlocks() once, rather than every
table_tuple_tid_valid(0 / table_get_latest_tid() call. Which is a good
improvement for nodeTidscan's table_get_latest_tid() call (for WHERE
CURRENT OF) - which previously computed the relation size once per
tuple.

Question on the patch, if not too late
Why call table_beginscan() in TidNext() and not in ExecInitTidScan() ? Seems cleaner to have it in ExecInitTidScan().

pgsql-hackers by date:

Previous
From: Ashwin Agrawal
Date:
Subject: Re: Pluggable Storage - Andres's take
Next
From: Andres Freund
Date:
Subject: Re: Pluggable Storage - Andres's take