Re: Packed short varlenas, what next? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Packed short varlenas, what next?
Date
Msg-id 25571.1172641497@sss.pgh.pa.us
Whole thread Raw
In response to Re: Packed short varlenas, what next?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Packed short varlenas, what next?  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
I wrote:
> Gregory Stark <stark@enterprisedb.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


pgsql-hackers by date:

Previous
From: Kris Jurka
Date:
Subject: Re: 5 Weeks till feature freeze or (do you know where your patch is?)
Next
From: "Jeroen T. Vermeulen"
Date:
Subject: Re: COMMIT NOWAIT Performance Option