diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-03-24 22:06:24 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-03-24 22:06:24 +0000 |
commit | e760463c7779f5021e6b8d81ca96b3edc40704ba (patch) | |
tree | 53f6fe81196f8db34358400d06cf0fb85f2ebb43 /src/backend/access/gist/gistget.c | |
parent | e1cf329061aed52e1948bb9bff870db68975c33d (diff) | |
download | postgresql-e760463c7779f5021e6b8d81ca96b3edc40704ba.tar.gz postgresql-e760463c7779f5021e6b8d81ca96b3edc40704ba.zip |
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.
Diffstat (limited to 'src/backend/access/gist/gistget.c')
0 files changed, 0 insertions, 0 deletions