Re: logical column ordering

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: logical column ordering
Date: 2015-02-26 18:49:04
Message-ID: 54EF6AA0.90707@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/23/15 5:09 PM, Tomas Vondra wrote:
> Over the time I've heard various use cases for this patch, but in most
> cases it was quite speculative. If you have an idea where this might be
> useful, can you explain it here, or maybe point me to a place where it's
> described?

For better or worse, table structure is a form of documentation for a
system. As such, it's very valuable to group related fields in a table
together. When creating a table, that's easy, but as soon as you need to
alter your careful ordering can easily end up out the window.

Perhaps to some that just sounds like pointless window dressing, but my
experience is that on a complex system the less organized things are the
more bugs you get due to overlooking something.

The other reason for this patch (which it maybe doesn't support
anymore?) is to allow Postgres to use an optimal physical ordering of
fields on a page to reduce space wasted on alignment, as well as taking
nullability and varlena into account.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-02-26 18:53:18 Re: plpgsql versus domains
Previous Message Andres Freund 2015-02-26 18:44:10 Re: plpgsql versus domains