Re: logical column ordering

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Phil Currier <pcurrier(at)gmail(dot)com>
Subject: Re: logical column ordering
Date: 2015-01-04 01:37:47
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andres Freund wrote:
> On 2014-12-09 14:41:46 -0300, Alvaro Herrera wrote:
> > So I've been updating my very old patch to allow logical and physical
> > column reordering. Here's a WIP first cut for examination.
> Do you have a updated patch that has ripened further?

Not yet. Phil was kind enough to send me his old patch for study; I
am stealing a few interesting ideas from there, in particular:

> > Another place that needs tweaking is heapam.c, which must construct a
> > physical tuple from Datum/nulls arrays (heap_form_tuple). In some cases
> > the input arrays are sorted in logical column order.
> I'm not sure that changing heaptuple.c's API (you mean that, not
> heapam.c, right?) is a good level to tackle this at. I think some
> function to reorder values/isnull arrays into logical order and reverse
> might end up being less invasive and actually faster.

Phil took a different route here than I did, and I think his design is
better than mine. The main idea is that the Datum/nulls arrays in a
TupleTableSlot always follows physical order (he calls it "storage
order"), rather than this very strange mixture of things I did by
hacking the heaptuple.c API. So I'm reworking my patch with that in

Álvaro Herrera
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-01-04 01:57:13 Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]
Previous Message Tom Lane 2015-01-04 00:56:06 Re: Small doc patch about pg_service.conf