Re: Packed short varlenas, what next?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Packed short varlenas, what next?
Date: 2007-02-28 05:44:57
Message-ID: 25571.1172641497@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Gregory Stark <stark(at)enterprisedb(dot)com> writes:
>> I'm really curious to know how people feel about the varlena patch.

> One thing I think we could do immediately is apply the change to replace
> "VARATT_SIZEP(x) = len" with "SET_VARSIZE(x, len)" --- that would
> considerably reduce the size of the patch and allow people to focus on
> the important changes instead of underbrush. Barring objection I'll go
> ahead and do that today.

I've committed this, but in testing with a hack that does ntohl() in the
VARSIZE macro and vice-versa in SET_VARSIZE, I find that core passes
regression but several contrib modules do not. It looks like the
contrib modules were depending on various random structs being
compatible with varlena, while not exposing that dependence in ways that
either of us caught :-(.

I'll work on cleaning up the remaining mess tomorrow, but I think that
we may need to think twice about whether it's OK to expect that every
datatype with typlen = -1 will be compatible with the New Rules. I'm
back to wondering if maybe only types with typalign 'c' should get
caught up in the changes.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeroen T. Vermeulen 2007-02-28 05:54:36 Re: COMMIT NOWAIT Performance Option
Previous Message Kris Jurka 2007-02-28 05:42:35 Re: [HACKERS] 5 Weeks till feature freeze or (do you know where your patch is?)