Re: Memory prefetching while sequentially fetching from SortTuple array, tuplestore - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Memory prefetching while sequentially fetching from SortTuple array, tuplestore
Date
Msg-id 20150902232610.GH8555@awork2.anarazel.de
Whole thread Raw
In response to Re: Memory prefetching while sequentially fetching from SortTuple array, tuplestore  (Peter Geoghegan <pg@heroku.com>)
Responses Re: Memory prefetching while sequentially fetching from SortTuple array, tuplestore  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
On 2015-09-02 16:23:13 -0700, Peter Geoghegan wrote:
> On Wed, Sep 2, 2015 at 4:12 PM, Andres Freund <andres@anarazel.de> wrote:
> >> Well, still needs to work for tuplestore, which does not have a SortTuple.
> >
> > Isn't it even more trivial there? It's just an array of void*'s? So
> > prefetch(state->memtuples + 3 + readptr->current)?
> 
> All I meant is that there couldn't be one centralized definition for
> both. I don't mind if you want to bake it into a macro for
> tupelstore.c and tuplesort.c.

I'm not following? Just write pg_read_prefetch(state->memtuples + 3 +
readptr->current) and the corresponding version for tuplesort in the
callsites?



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Memory prefetching while sequentially fetching from SortTuple array, tuplestore
Next
From: Michael Paquier
Date:
Subject: Re: Allow replication roles to use file access functions