Re: GIN code managing entry insertion not able to differentiate fresh and old indexes

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GIN code managing entry insertion not able to differentiate fresh and old indexes
Date: 2015-03-20 22:27:55
Message-ID: 20150320222755.GX6317@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 20, 2014 at 05:22:02PM +0900, Michael Paquier wrote:
> Hi all,
>
> While playing with the GIN code for an upcoming patch, I noticed that
> when inserting a new entry in a new index, this code path is not able
> to make the difference if the index is in a build state or not.
> Basically, when entering in ginEntryInsert(at)gininsert(dot)c GinBtree built
> via ginPrepareEntryScan does not have its flag isBuild set up
> properly. I think that it should be set as follows to let this code
> path be aware that index is in build state:
> btree.isBuild = (buildStats != NULL);
>
> Note that the entry insertion code does nothing with isBuild yet, so
> it does not really impact back-branches. However, if in the future we
> fix a bug in this area and need to make distinction between a fresh
> index and an old one well there will be problems. For those reasons,
> this correctness fix should be perhaps master-only for now (perhaps
> even 9.4 stuff as well).

Where did we leave this?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2015-03-20 22:30:39 Re: A possbile typo in src/bin/pg_dump.c
Previous Message Bruce Momjian 2015-03-20 22:19:37 Change of pg_ctl's default shutdown method