pgsql: Measure Bloom index signature-length reloption in bits, not word

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Measure Bloom index signature-length reloption in bits, not word
Date: 2016-06-03 14:52:56
Message-ID: E1b8qT2-0001pv-8z@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Measure Bloom index signature-length reloption in bits, not words.

Per discussion, this is a more understandable and future-proof way of
exposing the setting to users. On-disk, we can still store it in words,
so as to not break on-disk compatibility with beta1.

Along the way, clean up the code associated with Bloom reloptions.
Provide explicit macros for default and maximum lengths rather than
having magic numbers buried in multiple places in the code. Drop
the adjustBloomOptions() code altogether: it was useless in view of
the fact that reloptions.c already performed default-substitution and
range checking for the options. Rename a couple of macros and types
for more clarity.

Discussion: <23767(dot)1464926580(at)sss(dot)pgh(dot)pa(dot)us>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ee4af347ba89b8492d1f86b6456865e1de1d030f

Modified Files
--------------
contrib/bloom/bloom.h | 33 ++++++++-----
contrib/bloom/blscan.c | 2 +-
contrib/bloom/blutils.c | 125 ++++++++++++++++++++----------------------------
doc/src/sgml/bloom.sgml | 19 ++++----
4 files changed, 86 insertions(+), 93 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Greg Stark 2016-06-03 15:11:28 pgsql: Fix various common mispellings.
Previous Message Robert Haas 2016-06-03 14:02:50 pgsql: Cosmetic improvements to freeze map code.