]> granicus.if.org Git - postgresql/commit
Fix errors in contrib/bloom index build.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 22 Mar 2018 17:13:58 +0000 (13:13 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 22 Mar 2018 17:13:58 +0000 (13:13 -0400)
commit76e2b5ae4151e8a193d677cfab55d7228cbc8b97
tree39789f9163544b2f9ffaddd09f2b9230ce3794a1
parent66e92878aaec5cd505bba367b2fe6f8eb08715aa
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
contrib/bloom/blinsert.c