Skip site navigation (1) Skip section navigation (2)

pgsql: Fix performance problem when building a lossy tidbitmap.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix performance problem when building a lossy tidbitmap.
Date: 2011-08-20 18:53:37
Message-ID: E1Quqfp-0004Bd-5m@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
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.

Branch
------
REL8_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/6016005118295fdcd97d99a0f372f18a28251c48

Modified Files
--------------
src/backend/nodes/tidbitmap.c |   22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)

pgsql-committers by date

Next:From: Bruce MomjianDate: 2011-08-20 22:22:30
Subject: pgsql: Have thread_test create its test files in the currentdirectory,
Previous:From: Bruce MomjianDate: 2011-08-19 23:31:47
Subject: pgsql: Fix copyright.pl to properly us 'tie' function.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group