Re: logical column ordering - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: logical column ordering
Date
Msg-id 20150104013747.GH1457@alvh.no-ip.org
Whole thread Raw
In response to Re: logical column ordering  (Andres Freund <andres@anarazel.de>)
Responses Re: logical column ordering
Re: logical column ordering
List 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
mind.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Small doc patch about pg_service.conf
Next
From: Andres Freund
Date:
Subject: Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]