postgresql/contrib/bloom
Tom Lane abaffa9075 Fix contrib/bloom to work for unlogged indexes.
blbuildempty did not do even approximately the right thing: it tried
to add a metapage to the relation's regular data fork, which already
has one at that point.  It should look like the ambuildempty methods
for all the standard index types, ie, initialize a metapage image in
some transient storage and then write it directly to the init fork.
To support that, refactor BloomInitMetapage into two functions.

In passing, fix BloomInitMetapage so it doesn't leave the rd_options
field of the index's relcache entry pointing at transient storage.
I'm not sure this had any visible consequence, since nothing much
else is likely to look at a bloom index's rd_options, but it's
certainly poor practice.

Per bug #14155 from Zhou Digoal.

Report: <20160524144146.22598.42558@wrigleys.postgresql.org>
2016-05-24 21:04:35 -04:00
..
expected Fix contrib/bloom to work for unlogged indexes. 2016-05-24 21:04:35 -04:00
sql Fix contrib/bloom to work for unlogged indexes. 2016-05-24 21:04:35 -04:00
t Bloom index contrib module 2016-04-01 16:42:24 +03:00
.gitignore Bloom index contrib module 2016-04-01 16:42:24 +03:00
Makefile Bloom index contrib module 2016-04-01 16:42:24 +03:00
blcost.c Bloom index contrib module 2016-04-01 16:42:24 +03:00
blinsert.c Fix contrib/bloom to work for unlogged indexes. 2016-05-24 21:04:35 -04:00
bloom--1.0.sql Bloom index contrib module 2016-04-01 16:42:24 +03:00
bloom.control Bloom index contrib module 2016-04-01 16:42:24 +03:00
bloom.h Fix contrib/bloom to work for unlogged indexes. 2016-05-24 21:04:35 -04:00
blscan.c Avoid possible crash in contrib/bloom's blendscan(). 2016-05-17 17:01:18 -04:00
blutils.c Fix contrib/bloom to work for unlogged indexes. 2016-05-24 21:04:35 -04:00
blvacuum.c Revert no-op changes to BufferGetPage() 2016-04-20 08:31:19 -05:00
blvalidate.c Bloom index contrib module 2016-04-01 16:42:24 +03:00