Re: logical column ordering - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: logical column ordering
Date
Msg-id 54EF6AA0.90707@BlueTreble.com
Whole thread Raw
In response to Re: logical column ordering  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: logical column ordering
List 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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: plpgsql versus domains
Next
From: Tom Lane
Date:
Subject: Re: plpgsql versus domains