Re: Column storage positions

From: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Phil Currier <pcurrier(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Column storage positions
Date: 2007-02-21 17:20:49
Message-ID: 45DC7F71.7060809@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan wrote:
> Florian G. Pflug wrote:
>>
>> I think you'd want to have a flag per field that tell you if the user
>> has overridden the storage pos for that specific field. Otherwise,
>> the next time you have to chance to optimize the ordering, you might
>> throw away changes that the admin has done on purpose. The same hold
>> true for a pg_dump/pg_reload cycle. If none of the fields had their
>> storage order changed manually, you'd want to reoder them optimally
>> at dump/reload time. If, however, the admin specified an ordering, you'd
>> want to preserve that.
>>
>
> I don't think users should be monkeying with the storage position at
> all. Decisions about that should belong to the engine, not to users.
> Providing a user tweakable knob for this strikes me as a large footgun,
> as well as requiring all sorts of extra checks along the lines you are
> talking of.

Maybe you shouldn't support specifying the storage order directly, but
rather through some kind of "priority field". The idea would be that
the storage order is determinted by sorting the fields according to
the priority field. Groups of fields with the same priority would
get ordered for maximal space efficiency.

greetings, Florian Pflug

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2007-02-21 17:59:50 Re: Column storage positions
Previous Message Martijn van Oosterhout 2007-02-21 17:20:19 Re: Column storage positions