[postgis-tickets] [PostGIS] #3058: picksplit method for column 1 of index "nd_geometry_idx" failed
PostGIS
trac at osgeo.org
Mon Mar 2 08:25:56 PST 2015
#3058: picksplit method for column 1 of index "nd_geometry_idx" failed
---------------------+------------------------------------------------------
Reporter: strk | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone:
Component: postgis | Version: trunk
Keywords: |
---------------------+------------------------------------------------------
Comment(by strk):
I believe it is _us_ setting 0 entries in one side:
{{{
DEBUG: switched to buffered GiST build; level step = 1, pagesPerBuffer =
305
NOTICE: YYY below:2, above:0
NOTICE: XXX FOR d:2, below:0, above:141
ERROR: XXX direction:2, below: 0, above: 141, posmax:141
}}}
The gserialized_gist_picksplit_badratios does not return TRUE for such
configuration (maybe because it only does so if _all_ of the dimensions
have that problem?). But then when looking for the plan giving us the most
"even ratio" the code looks suspicious, really only checking for the max
number of items in any of the two sides. Evidently 141 happens to be the
biggest number, and that plane is picked, which has 0 on the other side:
{{{
/*
** Now, what splitting plane gives us the most even ratio of
** entries in our child pages? Since each split region has been
apportioned entries
** against the same number of total entries, the axis that has the
smallest maximum
** number of entries in its regions is the most evenly distributed.
** TODO: what if the distributions are equal in two or more axes?
*/
for ( d = 0; d < ndims_pageunion; d++ )
{
int posd = Max(pos[ABOVE(d)],pos[BELOW(d)]);
if ( posd > posmax )
{
direction = d;
posmax = posd;
}
if ( pos[BELOW(d)] == 0 || pos[ABOVE(d)] == 0 )
{
lwnotice("XXX FOR d:%d, below:%d, above:%d", d, pos[BELOW(d)],
pos[ABOVE(d)]);
}
}
}}}
Should the difference between ABOVE and BELOW be considered instead, and
the _minimum_ difference be taken as the best split ?
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/3058#comment:8>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list