From: | Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com> |
---|---|
To: | "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru> |
Cc: | Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: [PATCH] Covering SPGiST index |
Date: | 2020-09-02 15:42:57 |
Message-ID: | CALT9ZEHEiwW4riEyRgp0otBs=FPf0m38MnkryeE8z0L1b1B4bQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>
> I have a wild idea of renaming nextOffset in SpGistLeafTupleData.
> Or at least documenting in comments that this field is more than just an
> offset.
>
Seems reasonable as previous changes localized mentions of nextOffset only
to leaf tuple definition and access macros. So I've done this renaming.
> This looks like assert rather than real runtime check in spgLeafTupleSize()
>
> + if (state->includeTupdesc->natts + 1 >= INDEX_MAX_KEYS)
> + ereport(ERROR,
> + (errcode(ERRCODE_TOO_MANY_COLUMNS),
> + errmsg("number of index columns
> (%d) exceeds limit (%d)",
> +
> state->includeTupdesc->natts, INDEX_MAX_KEYS)));
> Even if you go with check, number of columns is
> state->includeTupdesc->natts + 1.
>
I placed this check only once on SpGist state creation and replaced the
other checks to asserts.
> Also I'd refactor this
> + /* Form descriptor for INCLUDE columns if any */
>
Also done. Thanks a lot!
See v10.
--
Best regards,
Pavel Borisov
Postgres Professional: http://postgrespro.com <http://www.postgrespro.com>
Attachment | Content-Type | Size |
---|---|---|
v10-0001-Covering-SP-GiST-index-support-for-INCLUDE-colum.patch | application/octet-stream | 79.8 KB |
v1-0002-Add-VACUUM-ANALYZE-to-index-including-test.patch | application/octet-stream | 1.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Juan José Santamaría Flecha | 2020-09-02 15:51:27 | Re: A micro-optimisation for walkdir() |
Previous Message | Tom Lane | 2020-09-02 15:01:16 | Re: builtin functions, parameter names and psql's \df |