From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Greg Stark <gsstark(at)mit(dot)edu> |
Cc: | Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: CLUSTER can change t_len |
Date: | 2010-11-09 14:23:25 |
Message-ID: | 4CD9595D.20103@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 09.11.2010 15:57, Greg Stark wrote:
> On Tue, Nov 9, 2010 at 10:20 AM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>>>
>>> We have a comment /* be conservative */ in the function, but I'm not sure
>>> we actually need the MAXALIGN. However, there would be almost no benefits
>>> to keep t_len in small value because we often treat memory in MAXALIGN
>>> unit.
>>
>> Hmm, the conservatism at that point affects the free space calculations. I'm
>> not sure if it makes any difference in practice, but I'm also not sure it
>> doesn't. pd_upper is always MAXALIGNed, but pd_lower is not.
>>
>> This would be more in line with what the main heap_insert code does:
>
> Doesn't this cause assertion failures in heap_fill_tuple when the data
> size isn't what's expected? I guess we never actually use the t_len
> for later tuple reconstructions, we just recompute the needed size?
Right, the length from t_len or the item pointer is never passed to
heap_fill_tuple.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Aidan Van Dyk | 2010-11-09 14:28:36 | Re: Protecting against unexpected zero-pages: proposal |
Previous Message | Fujii Masao | 2010-11-09 14:16:03 | Re: How can we tell how far behind the standby is? |