Re: extensible external toast tuple support

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
Subject: Re: extensible external toast tuple support
Date: 2013-06-28 13:49:53
Message-ID: CA+TgmoaA-ccADNmzV6==h00=XXcbToBWUj5eWR5-vDkGX2ib3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 28, 2013 at 9:23 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Thu, Jun 27, 2013 at 12:56 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
>> Please find attached the next version of the extensible toast
>> support. There basically are two changes:
>>
>> * handle indirect toast tuples properly in heap_tuple_fetch_attr
>> and related places
>> * minor comment adjustments
>
> It looks to me like you need to pass true, rather than false, as the
> first argument to TrapMacro:
>
> +#define VARTAG_SIZE(tag) \
> + ((tag) == VARTAG_INDIRECT ? sizeof(varatt_indirect) : \
> + (tag) == VARTAG_ONDISK ? sizeof(varatt_external) : \
> + TrapMacro(false, "unknown vartag"))
>
> Still looking at the rest of this.

Why does toast_insert_or_update() need to go through all the
rigamarole in toast_datum_differs()? I would have thought that it
could simply treat any external-indirect value as needing to be
detoasted and retoasted, since the destination is the disk anyhow.

Do you see external-indirect values getting used for anything other
than logical replication? Is there code to do so anywhere?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2013-06-28 14:25:14 Re: Department of Redundancy Department: makeNode(FuncCall) division
Previous Message Pavel Stehule 2013-06-28 13:31:00 Re: proposal: enable new error fields in plpgsql (9.4)