pgsql: Fix errors in contrib/bloom index build.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix errors in contrib/bloom index build.
Date: 2018-03-22 17:14:20
Message-ID: E1ez3nA-0005th-Pw@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix errors in contrib/bloom index build.

Count the number of tuples in the index honestly, instead of assuming
that it's the same as the number of tuples in the heap. (It might be
different if the index is partial.)

Fix counting of tuples in current index page, too. This error would
have led to failing to write out the final page of the index if it
contained exactly one tuple, so that the last tuple of the relation
would not get indexed.

Back-patch to 9.6 where contrib/bloom was added.

Tomas Vondra and Tom Lane

Discussion: https://postgr.es/m/3b3d8eac-c709-0d25-088e-b98339a1b28a@2ndquadrant.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c35b47286960d2c7885dce162ddfe26939d0d373

Modified Files
--------------
contrib/bloom/blinsert.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2018-03-22 17:17:42 pgsql: Call pgstat_report_activity() in parallel CREATE INDEX workers.
Previous Message Robert Haas 2018-03-22 16:58:01 pgsql: Implement partition-wise grouping/aggregation.