postgresql/src/backend
Heikki Linnakangas ba1cc6501e Add some randomness to the choice of which GiST page to insert to.
When descending the tree for an insert, and there are multiple equally good
pages we could insert to, make the choice in random. Previously, we would
always choose the tuple with lowest offset number. That meant that when two
non-leaf pages overlap - in the extreme case they might have exactly the same
key - all but the first such page went unused. That wasn't optimal for space
usage; if you deleted some tuples from the non-first pages, the space would
never be reused.

With this patch, the other pages are sometimes chosen too, although there's
still a heavy bias towards low-offset tuples, so that we don't lose cache
locality when doing a lot of inserts with similar keys.

Original idea by Alexander Korotkov, although this patch version was written
by me and copy-edited by Tom Lane.
2013-01-25 16:58:38 +02:00
..
access Add some randomness to the choice of which GiST page to insert to. 2013-01-25 16:58:38 +02:00
bootstrap Improve handling of ereport(ERROR) and elog(ERROR). 2013-01-13 18:40:09 -05:00
catalog Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
commands Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
executor Fix SPI documentation for new handling of ExecutorRun's count parameter. 2013-01-24 18:34:00 -05:00
foreign Update copyrights for 2013 2013-01-01 17:15:01 -05:00
lib Update copyrights for 2013 2013-01-01 17:15:01 -05:00
libpq Update copyrights for 2013 2013-01-01 17:15:01 -05:00
main Update copyrights for 2013 2013-01-01 17:15:01 -05:00
nodes Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
optimizer Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
parser Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
po Translation updates 2011-08-17 14:07:46 +03:00
port Update copyrights for 2013 2013-01-01 17:15:01 -05:00
postmaster Also fix rotation of csvlog on Windows. 2013-01-24 11:41:30 +02:00
regex Update copyrights for 2013 2013-01-01 17:15:01 -05:00
replication Fix more issues with cascading replication and timeline switches. 2013-01-23 10:19:20 +02:00
rewrite Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
snowball Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
tcop Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
tsearch Update copyrights for 2013 2013-01-01 17:15:01 -05:00
utils Fix concat() and format() to handle VARIADIC-labeled arguments correctly. 2013-01-25 00:19:56 -05:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
Makefile Update copyrights for 2013 2013-01-01 17:15:01 -05:00
common.mk Call check_keywords.pl in maintainer-check 2012-02-27 13:53:12 +02:00
nls.mk Split out XLog reading as an independent facility 2013-01-16 16:12:53 -03:00