Re: Patch: Pass IndexInfo correctly to aminsert for indexes on TOAST - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Patch: Pass IndexInfo correctly to aminsert for indexes on TOAST
Date
Msg-id CA+TgmoajesRph4TcuBY=4s_GjvCyN34-sGbM5=APC=FH7k32jQ@mail.gmail.com
Whole thread Raw
In response to Patch: Pass IndexInfo correctly to aminsert for indexes on TOAST  ("Ahuja, Nitin" <nitahuja@amazon.com>)
List pgsql-hackers
On Thu, Feb 22, 2018 at 9:13 PM, Ahuja, Nitin <nitahuja@amazon.com> wrote:
> Patch Description
> Currently, while saving the TOAST entry the call to index access method
> insert (aminsert) passed IndexInfo attribute as NULL. IndexInfo parameter
> was introduced in Postgres 10 for the aminsert method to allow caching data
> across aminsert calls within a single SQL statement. The IndexInfo is passed
> correctly for regular tuple insertion but not for TOAST entries. This
> currently prohibits aminsert method to be able to use IndexInfo for TOAST
> entries.
>
> This patch correctly passes the built IndexInfo to aminsert for TOAST
> entries.

If you don't offer any justification for the patch it's unlikely to be
accepted.  BuildIndexInfo() isn't free, so unless it hurts something
to skip calling it, we should keep skipping it.

Also, your patch is (a) in the body of the email instead of attached,
(b) in HTML format, and (c) reversed -- if it were properly formatted,
the original hunks would be first and the revised ones second.

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


pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Using JSONB directly from application
Next
From: Robert Haas
Date:
Subject: Re: remove pg_class.relhaspkey