On Fri, May 30, 2014 at 06:55:18PM +0400, Teodor Sigaev wrote:
> >The point I'm making is that the scenario your test case exposes is not
> >an infinite loop of picksplits, but an infinite loop of choose calls.
>
> Thank you, now I see what I missed before. After some brainstorming,
> it's possible to use '\0' only as end of string marker. The idea
> is: when we split allthesame tuple to upper/lower we copy node label
> to upper tuple instead of set it to '\0'. Node labels of lower tuple
> will be unchanged but should be ignored for reconstructionValue -
> and they are ignored because of allTheSame flag. See attached
> patch.
>
> Unfortunately, it will break on-disk compatibility. Although it will
> not cause a panic/error/coredump allTheSame approach will not find
> tuples. Users should recreate spgist indexes over text column.
If we bump the system catalog version, pg_upgrade can mark those indexes
as invalid and output a script to reindex them.
-- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB
http://enterprisedb.com
+ Everyone has their own god. +