diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-08-20 14:51:02 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-08-20 14:51:43 -0400 |
commit | cb54b6614b6c34f5396d29de1e92b34a83b6c072 (patch) | |
tree | 2a77fedc79bf615cbce73c896462477d49065a18 /src/backend/access/gist/gistproc.c | |
parent | bcc9b17bbf92d1d94581d5536770b9689a767c37 (diff) | |
download | postgresql-cb54b6614b6c34f5396d29de1e92b34a83b6c072.tar.gz postgresql-cb54b6614b6c34f5396d29de1e92b34a83b6c072.zip |
Fix performance problem when building a lossy tidbitmap.
As pointed out by Sergey Koposov, repeated invocations of tbm_lossify can
make building a large tidbitmap into an O(N^2) operation. To fix, make
sure we remove more than the minimum amount of information per call, and
add a fallback path to behave sanely if we're unable to fit the bitmap
within the requested amount of memory.
This has been wrong since the tidbitmap code was written, so back-patch
to all supported branches.
Diffstat (limited to 'src/backend/access/gist/gistproc.c')
0 files changed, 0 insertions, 0 deletions