On 2/21/07, Martijn van Oosterhout <kleptog@svana.org> wrote:
On Wed, Feb 21, 2007 at 03:59:12PM +0100, 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.

Why would you want to let the admin have any say at all about the
storage order?

Well, for two reasons:

1) If you have a table with one very-frequently-accessed varchar()
column and several not-frequently-accessed int columns, it might
actually make sense to put the varchar column first.  The system won't
always be able to make the most intelligent decision about table
layout.

2) As I described in my original email, without this capability, I
don't see any good way to perform an upgrade between PG versions
without rewriting each table's data.  Maybe most people aren't doing
upgrades like this right now, but it seems like it will only become
more common in the future.  In my opinion, this is more important than
#1.

But I understand that it's a potential foot-gun, so I'm happy to drop
it.  It would be nice though if there were some ideas about how to
address problem #2 at least.

phil

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

               http://www.postgresql.org/about/donate

Reply via email to