On Wed, Sep 2, 2015 at 4:26 PM, Andres Freund <and...@anarazel.de> wrote: > I'm not following? Just write pg_read_prefetch(state->memtuples + 3 + > readptr->current) and the corresponding version for tuplesort in the > callsites?
Oh, I see. Maybe I'll do it that way when I pick this up in a little while. I need to consider the "no tuple proper" (pass-by-value datum sort) case within tuplesort.c, where stup.tuple is always NULL. Currently, we discriminate against such SortTuples for various other reasons (e.g. for memory accounting) by testing if the pointer is set, so I suppose I copied that pattern here. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers