Install a search tree depth limit in GIN bulk-insert operations, to prevent
them from degrading badly when the input is sorted or nearly so. In this
scenario the tree is unbalanced to the point of becoming a mere linked list,
so insertions become O(N^2). The easiest and most safely back-patchable
solution is to stop growing the tree sooner, ie limit the growth of N. We
might later consider a rebalancing tree algorithm, but it's not clear that
the benefit would be worth the cost and complexity. Per report from Sergey
Burladyan and an earlier complaint from Heikki.
Back-patch to 8.2; older versions didn't have GIN indexes.
gininsert.c (r188.8.131.52 -> r184.108.40.206)
gin.h (r220.127.116.11 -> r18.104.22.168)
pgsql-committers by date
|Next:||From: Peter Eisentraut||Date: 2009-03-25 13:07:26|
|Subject: pgsql: No period if it's not a sentence|
|Previous:||From: Tom Lane||Date: 2009-03-24 22:06:24|
|Subject: pgsql: Install a search tree depth limit in GIN bulk-insert operations, |