From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | GIN code managing entry insertion not able to differentiate fresh and old indexes |
Date: | 2014-11-20 08:22:02 |
Message-ID: | CAB7nPqSc4VQ9mHKqm_YvAfcTEhO-iUY8SKbXYdnMGnAi1XnPaw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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).
Patch is attached.
Regards,
--
Michael
Attachment | Content-Type | Size |
---|---|---|
20141120_gin_entry_build_fix.patch | application/x-patch | 468 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2014-11-20 08:32:17 | Re: GIN code managing entry insertion not able to differentiate fresh and old indexes |
Previous Message | Abhijit Menon-Sen | 2014-11-20 08:17:00 | Re: What exactly is our CRC algorithm? |