On 11/19/18 11:44 AM, Tomas Vondra wrote:
> On 11/19/18 10:28 AM, Masahiko Sawada wrote:
>> On Mon, Nov 19, 2018 at 6:52 AM Tomas Vondra
>> <tomas.vondra@2ndquadrant.com> wrote:
>>>
>>> ...
>>>
>>> This does fix the issue, because we still decode the TOAST changes but
>>> there are no data and so
>>>
>>> if (change->data.tp.newtuple != NULL)
>>> {
>>> dlist_delete(&change->node);
>>> ReorderBufferToastAppendChunk(rb, txn, relation,
>>> change);
>>> }
>>>
>>> ends up not stashing the change in the hash table.
>>
>> With the below change you proposed can we remove the above condition
>> because toast-insertion changes being processed by the reorder buffer
>> always have a new tuple? If a toast-insertion record doesn't have a
>> new tuple it has already ignored when decoding.
>>
>
> Good point. I think you're right the reorderbuffer part may be
> simplified as you propose.
>
OK, here's an updated patch, tweaking the reorderbuffer part. I plan to
push this sometime mid next week.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services